Skip to content

Commit

Permalink
Update Get-AzRoleAssignment.md
Browse files Browse the repository at this point in the history
Adding examples of how to use the 'ServicePrincipalName' parameter.
  • Loading branch information
SebastianClaesson authored Dec 17, 2024
1 parent 5934633 commit 8dd911e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Resources/Resources/help/Get-AzRoleAssignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,21 @@ Get-AzRoleAssignment -Scope "/subscriptions/96231a05-34ce-4eb4-aa6a-70759cbb5e83

Gets role assignments at the 'site1' website scope.

### Example 5
```powershell
$ApplicationObject = Get-AzADServicePrincipal -DisplayName 'ApplicationDisplayName'
Get-AzRoleAssignment -ServicePrincipalName $ApplicationObject.AppId
```

Gets role assignments for the specified Service Principal using Get-AzAdServicePrincipal.

### Example 6
```powershell
Get-AzRoleAssignment -ServicePrincipalName 'e456d065-ed9e-4b16-a43d-ef4aea724f52'
```

Gets role assignments for the specified Service Principal using the application id.

## PARAMETERS

### -DefaultProfile
Expand Down

0 comments on commit 8dd911e

Please sign in to comment.