Get-AzADUser
Lists entities from users or get entity from users by key
Warning
There are breaking changes in this cmdlet from version 6.6.0. The cmdlets in the Az PowerShell module that rely on Azure AD Graph have migrated to Microsoft Graph. This change is occurring because of the retirement announcement of Azure AD Graph. For more information, see Azure AD to Microsoft Graph migration changes in Azure PowerShell.
Syntax
Get-AzADUser
[-Expand <String[]>]
[-Select <String[]>]
[-First <UInt64>]
[-Skip <UInt64>]
[-AppendSelected]
[-Filter <String>]
[-Orderby <String[]>]
[-Search <String>]
[-ConsistencyLevel <String>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzADUser
[-Expand <String[]>]
[-Select <String[]>]
[-First <UInt64>]
[-Skip <UInt64>]
[-AppendSelected]
[-DefaultProfile <PSObject>]
-Mail <String>
[<CommonParameters>]
Get-AzADUser
[-Expand <String[]>]
[-Select <String[]>]
[-First <UInt64>]
[-Skip <UInt64>]
[-AppendSelected]
[-DefaultProfile <PSObject>]
-DisplayName <String>
[<CommonParameters>]
Get-AzADUser
[-Expand <String[]>]
[-Select <String[]>]
[-First <UInt64>]
[-Skip <UInt64>]
[-AppendSelected]
[-DefaultProfile <PSObject>]
-StartsWith <String>
[<CommonParameters>]
Get-AzADUser
[-Expand <String[]>]
[-Select <String[]>]
[-AppendSelected]
[-DefaultProfile <PSObject>]
-ObjectId <String>
[<CommonParameters>]
Get-AzADUser
[-Expand <String[]>]
[-Select <String[]>]
[-AppendSelected]
[-DefaultProfile <PSObject>]
-UserPrincipalName <String>
[<CommonParameters>]
Get-AzADUser
[-Expand <String[]>]
[-Select <String[]>]
[-AppendSelected]
[-DefaultProfile <PSObject>]
[-SignedIn]
[<CommonParameters>]
Description
Lists entities from users or get entity from users by key
Examples
Example 1: Get signin user
Get-AzADUser -SignedIn
Get signin user
Example 2: List users
Get-AzADUser -First 10 -Select 'City' -AppendSelected
List first 10 users and append property 'City' after default properties: 'DisplayName', 'Id', 'DeletedDateTime', 'UserPrincipalName', 'UsageLocation', 'GivenName', 'SurName', 'AccountEnabled', 'MailNickName', 'Mail'
Example 3: Get user by display name
Get-AzADUser -DisplayName $name
Get user by display name
Parameters
Append properties selected with default properties when this switch is on, only works with parameter '-Select'.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Indicates the requested consistency level. Documentation URL: https://developer.microsoft.com/en-us/office/blogs/microsoft-graph-advanced-queries-for-directory-objects-are-now-generally-available/
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | PSObject |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
user display name
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Expand related entities
| Type: | String[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Filter items by property values
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Gets only the first 'n' objects.
| Type: | UInt64 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
user mail address
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
key: id of user
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Order items by property values
| Type: | String[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Search items by search phrases
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Select properties to be returned
| Type: | String[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
user mail address
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Ignores the first 'n' objects and then gets the remaining objects.
| Type: | UInt64 |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
user display name starts with
| Type: | String |
| Aliases: | SearchString |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
user principal name
| Type: | String |
| Aliases: | UPN |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Outputs
Notes
ALIASES
الملاحظات
إرسال الملاحظات وعرضها المتعلقة بـ