Skip to content
Discussion options

You must be logged in to vote

found this issue today and how to get it working
firstly you need to have the correct authention scopes
I am using GH CLI and this gets the correct tokens
gh auth login -p https -h GitHub.com -s repo,user,admin:enterprise,admin:org -w

Then the query looks like this

$query = @'
query($cursor: String) {
  enterprise(slug: "<YOUR ENTERPRISE SLUG") {
    members(first: 100, after: $cursor, role:MEMBER) {
      pageInfo {
        hasNextPage
        endCursor
      }
      nodes{ 
        ... on EnterpriseUserAccount{ 
          login
          id, 
          organizations(first:2){ 
            nodes{
              ... on Organization{
                login
              }
            }
     …

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Timmmy-nlb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API and Webhooks Discussions related to GitHub's APIs or Webhooks Enterprise Discussions related to GitHub Enterprise Cloud, Enterprise Server and Organizations Question Ask and answer questions about GitHub features and usage
2 participants