Skip to content

Commit d5002a4

Browse files
[Az.Resources] Adding examples of how to use ServicePrincipalName parameter (#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.
1 parent 7259733 commit d5002a4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Resources/Resources/help/Get-AzRoleAssignment.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,14 @@ Get-AzRoleAssignment -Scope "/subscriptions/96231a05-34ce-4eb4-aa6a-70759cbb5e83
203203

204204
Gets role assignments at the 'site1' website scope.
205205

206+
### Example 5
207+
```powershell
208+
$ApplicationObject = Get-AzADServicePrincipal -DisplayName 'ApplicationDisplayName'
209+
Get-AzRoleAssignment -ServicePrincipalName $ApplicationObject.AppId
210+
```
211+
212+
Gets role assignments for the specified Service Principal using Get-AzAdServicePrincipal.
213+
206214
## PARAMETERS
207215

208216
### -DefaultProfile

0 commit comments

Comments
 (0)