github-api icon indicating copy to clipboard operation
github-api copied to clipboard

How to get list users that are assigned to an organization role

Open ishepard opened this issue 1 year ago • 1 comments

According to GH docs (List users that are assigned to an organization role), it should be:

https://api.github.com/orgs/ORG/organization-roles/ROLE_ID/users

In GHOrganization, I see there is a function listMembersWithRole, but it doesn't work for this case. The endpoint seems different:

/orgs/{this.login}/members

and when I tried it in my organization where there are 2 Owners and 1 Member, the function returns all members.

Is there a way to get this info? Thanks!

ishepard avatar Mar 02 '24 13:03 ishepard

This might be something on my side actually, I see that even when using the GH API I don't get the roles. I'll investigate further

ishepard avatar Mar 02 '24 14:03 ishepard

@ishepard Closing for now. Comment and I'll reopen.

bitwiseman avatar Jun 22 '24 05:06 bitwiseman