How To Get User Object ID In Azure Using PowerShell

You can use the Get-AzureADUser Azure AD PowerShell command to get a user’s Object ID in Azure using PowerShell.

How To Get User Object ID In Azure Using PowerShell

To get user object id in Azure using PowerShell, follow the below steps.

1. Open PowerShell ISE with Run As Administrator mode.

Get User Object ID In Azure Using PowerShell

2. We must use the below command to connect to the Azure account.

Connect-AzureAD

After executing the above command, I connected to my Azure account successfully, as shown below.

How To Get Object ID of the user In Azure Using PowerShell

3. Now, we can use the Get-AzureADUser PowerShell command to get the user’s object ID.

Connect-AzureAD -TenantId 5d9d690a-0310-474d-ae8b-42df2dxxxxxx
Get-AzureADUser

After executing the above command, I got the expected output as shown below.

How To Get User Object ID In Azure Using PowerShell

Conclusion

As mentioned in this article, getting a user object ID in Azure using PowerShell can be done using the Get-AzureADUser PowerShell command.

You may also like following the articles below.

Azure Virtual Machine

DOWNLOAD FREE AZURE VIRTUAL MACHINE PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!