Get-​Azure​AD​Contact​Membership

Get a contact membership.

Syntax

Get-AzureADContactMembership
   [-All <Boolean>]
   -ObjectId <String>
   [-Top <Int32>]
   [<CommonParameters>]

Description

The Get-AzureADContactMembership cmdlet gets a contact membership in Azure Active Directory.

Examples

Example 1: Get the memberships of a contact

PS C:\> $Contact = Get-AzureADContact -Top 1
PS C:\> Get-AzureADContactMembership -ObjectId $Contact.ObjectId

ObjectId                             ObjectType
--------                             ----------
0015df25-808e-4715-9c24-a6929c25c201 Group

The first command gets a contact by using the Get-AzureADContact cmdlet, and then stores it in the $Contact variable.

The second command gets the memberships for $Contact.

Required Parameters

-ObjectId

Specifies the ID of a contact in Azure Active Directory.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False

Optional Parameters

-All

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

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-Top

Specifies the maximum number of records to return.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False