In this blog post, I will show you how to search for users in Microsft Azure which uses Azure Active Directory for identity and user management.
Yesterday, I showed how to to get a list of your Azure users using PowerShell and today we will check how to search for a specific user.
Install-Module
To install the Azure PowerShell module, use the following cmdlet.
install-module az
Connect
To connect to Azure AD and Azure run the following cmdlet.
connect-azaccount
Search
Below there are two examples. the first one shows how to search for a user using a text string in case you don’t know his full UPN.
The second line shows how to search for a specific user using his or her UPN.
Get-AzADUser -SearchString "nt*"
Get-AzADUser -UserPrincipalName [email protected]
Processing…
Success! You're on the list.
Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.