Get-AzureADGroupMember

Gets a member of a group.

Syntax

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

Description

The Get-AzureADGroupMember cmdlet gets a member of a group in the Microsoft Entra ID.

Examples

Example 1: Get a group member by ID

PS C:\>Get-AzureADGroupMember -ObjectId "62438306-7c37-4638-a72d-0ee8d9217680"

ObjectId                             ObjectType
--------                             ----------
0a1068c0-dbb6-4537-9db3-b48f3e31dd76 User

Example 2: Get all members within a group by group ID

PS C:\> Get-AzureADGroupMember -ObjectId "12431118-5c12-6653-h82e-1ee8d9217682" -All $true

ObjectId                             ObjectType
--------                             ----------
0a1068c0-dbb6-4537-9db3-b48f3e31dd76 User
0a1068c0-dbb6-4537-9db3-b48f3e31dd76 User
0a1068c0-dbb6-4537-9db3-b48f3e31dd76 Group

Parameters

-All

If true: Return all group members.

If false: Return the number of objects specified by the Top parameter. If the top parameter is not specified, return the first 100 group members.

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

-ObjectId

Specifies the ID of a group in the Microsoft Entra ID.

Type:String
Position:Named
Default value:None
Required:True
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

Notes

See the migration guide for Get-AzureADGroupMember to the Microsoft Graph PowerShell.