Επεξεργασία

Κοινή χρήση μέσω


Get-AzureADUserAppRoleAssignment

Get a user application role assignment.

Syntax

Get-AzureADUserAppRoleAssignment
   -ObjectId <String>
   [-All <Boolean>]
   [-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 (./Get-AzureADUser.md)cmdlet. The command stores the value in the $UserId variable.

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

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
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ObjectId

Specifies the ID of a user (as a UPN or ObjectId) in Azure Active Directory.

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-AzureADUserAppRoleAssignment to the Microsoft Graph PowerShell.