Get-EntraGroupAppRoleAssignment

Gets a group application role assignment.

Syntax

Get-EntraGroupAppRoleAssignment
   -GroupId <String>
   [-All]
   [-Top <Int32>]
   [-Property <String[]>]
   [<CommonParameters>]

Description

The Get-EntraGroupAppRoleAssignment cmdlet gets a group application role assignment in Microsoft Entra ID. Specify the GroupId parameter to get a group application role assignment.

Examples

Example 1: Retrieve application role assignments of a group

Connect-Entra -Scopes 'Directory.Read.All'
$group = Get-EntraGroup -SearchString 'Contoso marketing'
Get-EntraGroupAppRoleAssignment -GroupId $group.Id

ObjectId                                    ResourceDisplayName                 PrincipalDisplayName
--------                                    -------------------                 --------------------
MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR
MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi                 Ask HR
MSVrBV4APk--eAGnHqMKBDtEqPRvu8xLqWHDSXUhoTE M365 License Manager                Ask HR

This example retrieves the application role assignments of a group.

  • -GroupId parameter specifies the ID of a group in Microsoft Entra ID.

Example 2: Retrieve all application role assignments of a group

Connect-Entra -Scopes 'Directory.Read.All'
$group = Get-EntraGroup -SearchString 'Contoso marketing'
Get-EntraGroupAppRoleAssignment -GroupId $group.Id -All

ObjectId                                    ResourceDisplayName                 PrincipalDisplayName
--------                                    -------------------                 --------------------
MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR
MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi                 Ask HR
MSVrBV4APk--eAGnHqMKBDtEqPRvu8xLqWHDSXUhoTE M365 License Manager                Ask HR

This example retrieves all application role assignments of the specified group.

  • -GroupId parameter specifies the ID of a group in Microsoft Entra ID.

Example 3: Retrieve top two application role assignments of a group

Connect-Entra -Scopes 'Directory.Read.All'
$group = Get-EntraGroup -SearchString 'Contoso marketing'
Get-EntraGroupAppRoleAssignment -GroupId $group.Id -Top 2

ObjectId                                    ResourceDisplayName                 PrincipalDisplayName
--------                                    -------------------                 --------------------
MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR
MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi                 Ask HR

This example retrieves top two application role assignments of the specified group.

  • -GroupId parameter specifies the ID of a group in Microsoft Entra ID.

Parameters

-All

List all pages.

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-GroupId

Specifies the ID of a group in Microsoft Entra ID.

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

-Property

Specifies properties to be returned

Type:System.String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Top

Specifies the maximum number of records to return.

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