In this Azure PowerShell article, we will discuss the syntax and usage of the Get-AzADUser PowerShell command with examples.
Table of Contents
Get-AzADUser
The Get-AzADUser Azure PowerShell command can get you the list of AD users.
Syntax
Below is the syntax of the Get-AzADUser PowerShell command.
Get-AzADUserGet-AzADUser -Mail <String>
Get-AzADUser -DisplayName <String>Get-AzADUser -StartsWith <String>Get-AzADUser -ObjectId <String>Get-AzADUser -SignedInLet’s discuss a few examples of how to use the Get-AzADUser PowerShell command.
Example-1:
Run the below PowerShell command to get the list of the AD users.
Get-AzADUserAfter executing the above command, I got the below output.
DisplayName Id Mail UserPrincipalName
----------- -- ---- -----------------
Bijay Kumar Sahoo 54481342-e592-47c2-ba89-b07dcadf9346 fewlines4biju_hotmail.c...
You can check out the same output below

Example-2:
You can execute the below PowerShell command to get the Azure AD user based on the Display name. Here, I will get the user details with the display name “Bijay Kumar Sahoo”.
Get-AzADUser -DisplayName "Bijay Kumar Sahoo"After executing the above command, I got the below output.
DisplayName Id Mail UserPrincipalName
----------- -- ---- -----------------
Bijay Kumar Sahoo 54481342-e592-47c2-ba89-b07dcadf9346 fewlines4biju_hotmail.c...You can check out the same output below

Example-3:
To get the AD user based on the specified Object ID, you can execute the below PowerShell command.
PS C:\WINDOWS\system32> Get-AzADUser -ObjectId 54481342-e592-47c2-ba89-b07dcadf9346
DisplayName Id Mail UserPrincipalName
----------- -- ---- -----------------
Bijay Kumar Sahoo 54481342-e592-47c2-ba89-b07dcadf9346 fewlines4biju_hotmail.c...You can check out the same output below

Example-4:
You can execute the below PowerShell command to get the signed-in user details.
Get-AzADUser -SignedInAfter executing the above command, I got the below output.
PS C:\WINDOWS\system32> Get-AzADUser -SignedIn
DisplayName Id Mail UserPrincipalName
----------- -- ---- -----------------
Bijay Kumar Sahoo 54481342-e592-47c2-ba89-b07dcadf9346 fewlines4biju_hotmail.c...You can see the same output below

Get-AzADUser PowerShell Command – Video Tutorial
You may also like following the below articles
Wrapping Up
In this Azure article, we discussed the syntax and usage of the Get-AzADUser PowerShell command with a few examples. Thanks for reading this article !!!

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.
