QuestionQ82

VerifiedImplement Azure security

You have 100 Azure virtual machines (VMs) for which the system-assigned managed identity is enabled.

You need to determine the object ID attribute value for each identity.

Which command should you use?

Explanation

For a VM with a system-assigned managed identity, the managed identity's object ID is the resource identity PrincipalId. Get-AzResource retrieves the VM resource and exposes this value through Identity.PrincipalId.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!