Get-​Azure​AD​User​App​Role​Assignment

Get a user application role assignment.

Syntax

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

Examples

Example 1: Get a user application role assignment

PS C:\> $UserId = (Get-AzureADUser -Top 1).ObjectId
Get-AzureADUserAppRoleAssignment -ObjectId $UserId

The first command gets the ID of an Azure AD user by using the Get-AzureADUser cmdlet. The command stores the value in the $UserId variable.

The second command gets a user application role assignment for the user in $UserId.

Required Parameters

-ObjectId

Specifies the ID of a user (as a UPN or ObjectId) 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 user application role assignments for this user. 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