Reputation: 5889
I try to retrieve the membership details of a GitHub user using the GitHub API and the endpoint /user/memberships/orgs
.
I'm member of multiple organizations but all I get as a response is:
200 OK
[]
So there's no membership information shown for my user. I have an access token with scope user
. Did I miss something? I also can't find any information regarding this in the official API documentation: https://developer.github.com/v3/orgs/members/#list-your-organization-memberships
Upvotes: 4
Views: 342
Reputation: 5889
If you want to get information about an organization membership the OAuth app has to be trusted by each company the user has a membership. If it's not a trusted OAuth app you don't get any information about a membership of the user for this organization.
See: https://help.github.com/articles/authorizing-oauth-apps/#oauth-apps-and-organizations
Upvotes: 6