Correct: * az resource show * Get-AzResource Incorrect: * az ad signed-in-user list-owned-objects * az ad sp credential list * az ad user show * Get-AzVM * Get-AzureADUser * Get-AzureADUserOwnedObject Note: * Get-AzResource For a system-assigned managed identity, you can find the object ID on the Azure portal on the resource's Identity page. You can also use the following PowerShell script to find the object ID. You'll need the resource ID of the resource. PowerShell: $resourceIdWithManagedIdentity = '/subscriptions/{my subscription ID}/resourceGroups/{my resource group name}/providers/Microsoft.Compute/virtualMachines/{my virtual machine name}' (Get-AzResource -ResourceId $resourceIdWithManagedIdentity).Identity.PrincipalId 1* az resource show You can also use the following script to find the object ID. You'll need the resource ID of the resource you created. Azure CLI: resourceIdWithManagedIdentity="/subscriptions/{my subscription ID}/resourceGroups/{my resource group name}/providers/Microsoft.Compute/virtualMachines/{my virtual machine name}" oidForMI=$(az resource show --ids $resourceIdWithManagedIdentity --query "identity.principalId" -o tsv | tr -d '[:space:]') echo "object id for managed identity is: $oidForMI" Reference: https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/how-to-assign-app-role-managed-identity