Edit

Share via


Get-AzureADGroupMember

Gets a member of a group.

Syntax

Default (Default)

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 "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb"

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

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

PS C:\> Get-AzureADGroupMember -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -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.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-ObjectId

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Top

Specifies the maximum number of records to return.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Notes

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