Skip to content

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

@Rasmus-S-Kristensen

Description

@Rasmus-S-Kristensen

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_

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions