Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 3

Bug when querying organization members using GraphQL

Solved! Go to Solution.

Using https://developer.github.com/v4/explorer/, I'm able to query all users of my organization with my login. However, if I'm using GraphQL directly using my personal access token (which have all permissions enable), I can only see the public users. This is the query:

 

query ($organization: String!, $after: String) {
  organization(login: $organization) {
    membersWithRole(first: 100, after: $after) {
      totalCount
      pageInfo {
        hasNextPage
        endCursor
      }
      nodes {
        id
        login
      }
    }
  }
}
2 Replies
Solution
Copilot Lvl 3
Message 2 of 3

Re: Bug when querying organization members using GraphQL

Sorry, the problem was that I was using the wrong token when I added the permissions. Solved.

Community Manager
Message 3 of 3

Re: Bug when querying organization members using GraphQL

Hey @plentz, Thanks for coming back and sharing what worked for you!


Best,
AndreaG

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!