[Feature]: Support system-assigned managed identity in VM/Arc Run Command cmdlets #27527
Labels
Compute - VM
customer-reported
feature-request
This issue requires a new behavior in the product in order be resolved.
Service Attention
This issue is responsible by Azure service team.
Uh oh!
There was an error while loading. Please reload this page.
Description of the new feature
The
{New,Update,Invoke}-AzConnectedMachineRunCommand
and{Set,Invoke}-AzVmRunCommand
cmdlets support using user-assigned managed identities to retrieve a script from Azure Storage via the-ScriptUriManagedIdentityClientId
and-ScriptUriManagedIdentityObjectId
parameters. It does not appear there is a way to use a system-assigned managed identity via these parameters.The support for user-assigned managed identities in the ConnectedMachine cmdlets is great, except for one small problem: as far as I can tell, Arc servers still don't support user-assigned managed identities. So this feature is currently useless for those cmdlets.
The underlying VM and Arc RunCommand REST APIs supposedly supports system-assigned managed identities via the JSON payload:
https://learn.microsoft.com/en-us/rest/api/hybridcompute/machine-run-commands/create-or-update?view=rest-hybridcompute-2025-01-13&tabs=HTTP#machineruncommandscriptsource
However, when I try this via the
-JsonString
parameter, I receive "The request does not have sufficient information to complete the operation. Missing or invalid properties: ScriptUriManagedIdentity is not valid: Exactly one property should be populated between CientId and ObjectId.."Proposed implementation details (optional)
It would be nice if we had a
-ScriptUriManagedIdentity
switch to simplify this.The text was updated successfully, but these errors were encountered: