Search For an Azure User With Azure PowerShell

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 user@domain.local

Processing…
Success! You're on the list.


Posted

in

by