microsoftgraph / microsoftgraph/msgraph-sdk-python

No code path in sdk for getting directory role members directly from role template id

Open
#1,524 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status:waiting-for-triage type:bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.