Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ishepard opened this issue Mar 2, 2024 · 1 comment
Open

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

ishepard opened this issue Mar 2, 2024 · 1 comment

Comments

@ishepard
Copy link

ishepard commented Mar 2, 2024

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
Copy link
Author

ishepard commented Mar 2, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant