Get-AzureADMSRoleAssignment

Gets information about role assignments in Azure AD.

Syntax

Get-AzureADMSRoleAssignment
   [-All <Boolean>]
   [-Top <Int32>]
   [-Filter <String>]
   [<CommonParameters>]
Get-AzureADMSRoleAssignment
   [-SearchString <String>]
   [-All <Boolean>]
   [<CommonParameters>]
Get-AzureADMSRoleAssignment
   -Id <String>
   [-All <Boolean>]
   [<CommonParameters>]

Description

The Get-AzureADMSRoleAssignment cmdlet gets information about role assignments in Azure Active Directory (Azure AD). To get a role assignment, specify the Id parameter. Specify the SearchString or Filter parameter to find particular role assignment.

Examples

Example 1

PS C:\> Get-AzureADMSRoleAssignment -Filter "roleDefinitionId eq '62e90394-69f5-4237-9190-012177145e34'"

RoleDefinitionId                     PrincipalId                          ResourceScope Id
----------------                     -----------                          ------------- --
62e90394-69f5-4237-9190-012177145e34 69584002-b4d1-4055-9c94-320542efd653 /             lAPpYvVpN0KRkAEhdxReEAJAWGnRqAVAnJQyBBLv1lM-1
62e90394-69f5-4237-9190-012177145e34 3f5e48d2-6bf4-4bf3-a4ff-8bbd9f23ed0b /             lAPpYvVpN0KRkAEhdxReENJPEj_0a_NLpP-LvZ8D7Qs-1

Example 2

PS C:\> Get-AzureADMSRoleAssignment -Filter "principalId eq '69584002-b4d1-4055-9c94-320542efd653'"

RoleDefinitionId                     PrincipalId                          ResourceScope Id
----------------                     -----------                          ------------- --
89c55b63-78c3-478b-b79e-074d0e87269e 69584002-b4d1-4055-9c94-320542efd653 /             Y1vFBcN4i0e3ngdNDocmngJAWGnRtGDAnJQyBBLv1lM-1
62e90394-69f5-4237-9190-012177145e34 69584002-b4d1-4055-9c94-320542efd653 /             lAPpYvVpN0KRkAEhdxReEAJAWGnRtGDAnJQyBBLv1lM-1
eb1d8c90-acf5-460d-8424-c1f1a6fbdb85 69584002-b4d1-4055-9c94-320542efd653 /             NIwd6_WsDUaEJMHxpvvbhQJAWGnRtGDAnJQyBBLv1lM-1

Parameters

-All

If true, return all role assignments. 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

-Filter

Specifies an oData v3.0 filter string to match a set of role assignments.

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

-Id

Specifies the ID of the role assignment that this cmdlet gets.

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

-SearchString

Specifies a search string.

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

-Top

Specifies the maximum number of records that this cmldet gets. The default value is 100.

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

Inputs

String

System.Nullable1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] System.Nullable1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

Outputs

Object