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.

2. We must use the below command to connect to the Azure account.
Connect-AzureADAfter executing the above command, I connected to my Azure account successfully, as shown below.

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-AzureADUserAfter executing the above command, I got the expected output as shown below.

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.
- How To Check User Role In Azure Portal
- How To Disable A User In Azure AD
- Add User To Azure AD Group PowerShell

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
