microsoftgraph / microsoftgraph/msgraph-sdk-python
No code path in sdk for getting directory role members directly from role template id
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 630
- Forks
- 96
- Avg merge
- 15h 20m
- Merged PRs (30d)
- 3
Description
Describe the bug
I want to look up members of a directory role by its template id:
GET /directoryRoles(roleTemplateId='{roleTemplateId}')/members
As documented here: https://learn.microsoft.com/en-us/graph/api/directoryrole-list-members?view=graph-rest-1.0&tabs=python#http-request
But the closest I could come was:
client.directory_roles_with_role_template_id("placeholder-id").members # But .members does not exist
Unless I have missed it, it looks like the /directoryRoles(roleTemplateId='{roleTemplateId}')/members query is not possible with the current SDK.
Expected behavior
It should be possible to make the query GET /directoryRoles(roleTemplateId='{roleTemplateId}')/members via the SDK.
How to reproduce
N/A (apart from trying to construct the query)
SDK Version
1.58.0
Latest version known to work for scenario above?
No response
Known Workarounds
It can be worked around by first getting the directory role, and then querying its members by role id (instead of role template id).
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
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 at the client.directory_roles_with_role_template_id("placeholder-id") entry point and trace how the directory role resource exposes members. Confirm that the SDK can issue GET /directoryRoles(roleTemplateId='{roleTemplateId}')/members and verify the result against the documented Microsoft Graph request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100