Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Az.Resources] Adding examples of how to use ServicePrincipalName parameter #26891

Merged
merged 2 commits into from
Feb 5, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
YanaXu marked this conversation as resolved.
Show resolved Hide resolved
```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
Loading