Skip to content

Commit

Permalink
Merge pull request #2945 from msewaweru/sfi-get-mgdirectoryrole
Browse files Browse the repository at this point in the history
Updated example to remove mentions of Global admin
  • Loading branch information
timayabi2020 authored Sep 6, 2024
2 parents f4348e1 + 1000272 commit 7dba601
Showing 1 changed file with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
Get-MgDirectoryRole | Format-List
DeletedDateTime :
Description : Can manage all aspects of Azure AD and Microsoft services that use Azure AD identities.
DisplayName : Global Administrator
Id : a2d10e79-df32-47fc-86ef-64d199860810
Description : Can read basic directory information. Commonly used to grant directory read access to
applications and guests.
DisplayName : Directory Readers
Id : 86596a70-0099-457d-8c89-1f5085b395ca
Members :
RoleTemplateId : 1f12db9c-dbb3-410d-a893-4c0bc322bf85
RoleTemplateId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b
ScopedMembers :
AdditionalProperties : {}
```
Expand All @@ -18,17 +19,18 @@ This examples gets all the available directory roles.
### Example 2: Get a directory role by Id

```powershell
Get-MgDirectoryRole -DirectoryRoleId 'a2d10e79-df32-47fc-86ef-64d199860810' |
Get-MgDirectoryRole -DirectoryRoleId '86596a70-0099-457d-8c89-1f5085b395ca' |
Format-List
DeletedDateTime :
Description : Can manage all aspects of Azure AD and Microsoft services that use Azure AD identities.
DisplayName : Global Administrator
Id : a2d10e79-df32-47fc-86ef-64d199860810
Description : Can read basic directory information. Commonly used to grant directory read access to
applications and guests.
DisplayName : Directory Readers
Id : 86596a70-0099-457d-8c89-1f5085b395ca
Members :
RoleTemplateId : 1f12db9c-dbb3-410d-a893-4c0bc322bf85
RoleTemplateId : 88d8e3e3-8f55-4a1e-953a-9b9898b8876b
ScopedMembers :
AdditionalProperties : {}
AdditionalProperties : {[@odata.context, https://graph.microsoft.com/v1.0/$metadata#directoryRoles/$entity]}
```

This example gets the directory role based on the specified Id.

0 comments on commit 7dba601

Please sign in to comment.