Get-AzureADMSUser

Gets a user.

Syntax

Get-AzureADMSUser
   [-All <Boolean>]
   [-Top <Int32>]
   [-Select <String>]
   [-Filter <String>]
   [<CommonParameters>]
Get-AzureADMSUser
   [-SearchString <String>]
   [-All <Boolean>]
   [<CommonParameters>]
Get-AzureADMSUser
   -Id <String>
   [-All <Boolean>]
   [-Select <String>]
   [<CommonParameters>]

Description

Gets a user in Azure Active Directory (Azure AD).

Examples

Example 1

PS C:\> Get-AzureADMSUser -Filter "UserPrincipalName eq 'TestUser@example.com'"

Get a user by user principal name.

Example 2

PS C:\> $user1 = Get-AzureADMSUser -Id dbb22700-a7de-4372-ae78-0098ee60e55e -Select CustomSecurityAttributes
PS C:\> $user1.CustomSecurityAttributes

List custom security attribute assignments for a user.

Parameters

-All

If true, return all users. If false, return the number of objects specified by the Top parameter

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Filter

Specifies an oData v3.0 filter statement. This parameter controls which objects are returned. Details on querying with oData can be found here. http://www.odata.org/documentation/odata-version-3-0/odata-version-3-0-core-protocol/#queryingcollections

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Id

Specifies the ID of a user in Azure AD.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-SearchString

Specifies a search string.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Select

Specifies the properties to be returned on the object.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Top

Specifies the maximum number of records to return.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Inputs

String

Nullable<T>[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

Nullable<T>[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

Outputs

Object