Skip to content

Commit

Permalink
[Az.Resources] Adding examples of how to use ServicePrincipalName par…
Browse files Browse the repository at this point in the history
…ameter (Azure#26891)

* Update Get-AzRoleAssignment.md

Adding examples of how to use the 'ServicePrincipalName' parameter.

* Removing example 6

Removed example 6 as it was very similiar to example 5.
  • Loading branch information
SebastianClaesson authored Feb 5, 2025
1 parent 7259733 commit d5002a4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 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,14 @@ 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.

## PARAMETERS

### -DefaultProfile
Expand Down

0 comments on commit d5002a4

Please sign in to comment.