microsoftgraph / microsoftgraph/msgraph-sdk-powershell
Get-MgDirectoryRoleMember should allow to filter by role template ID
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 898
- Forks
- 230
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 31
Description
Currently, Get-MgDirectoryRoleMember only allows to filter by Directory Role ID:
-DirectoryRoleId <String>
However, the underlying Graph API endpoint also allows to filter directly by Role Template ID:
You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs.
It would be nice to have this possibility directly in Get-MgDirectoryRoleMember:
-DirectoryRoleTemplateId <String>
It would avoid having to combine Get-MgDirectoryRole then Get-MgDirectoryRoleMember, like this:
$dirsync = Get-MgDirectoryRole -Filter "RoleTemplateId eq 'd29b2b05-8046-44ba-8758-1e26182fcf32'"
Get-MgDirectoryRoleMember -DirectoryRoleId $dirsync.Id
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Get-MgDirectoryRoleMember and Get-MgDirectoryRole entry points and compare their parameters with the Microsoft Graph directoryrole-list-members endpoint documentation. Done means Get-MgDirectoryRoleMember accepts -DirectoryRoleTemplateId and retrieves members directly by role template ID without first calling Get-MgDirectoryRole.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- api, authorization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100