Skip to content

Instantly share code, notes, and snippets.

@jamesmartin
Created July 18, 2018 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesmartin/57d09d40f9f93d85ccd44e791aa0a96f to your computer and use it in GitHub Desktop.
Save jamesmartin/57d09d40f9f93d85ccd44e791aa0a96f to your computer and use it in GitHub Desktop.
Listing all External Identities of a SAML enabled GitHub Organization
query($login: String!) {
organization(login: $login) {
... on Organization {
samlIdentityProvider {
externalIdentities(first: 30) {
edges {
node {
samlIdentity {
nameId
}
user {
login
}
}
}
}
}
}
}
}
{
"data": {
"organization": {
"samlIdentityProvider": {
"externalIdentities": {
"edges": [
{
"node": {
"samlIdentity": {
"nameId": "jamesmartin"
},
"user": {
"login": "jamesmartin"
}
}
},
{
"node": {
"samlIdentity": {
"nameId": "mtodd@example.com"
},
"user": {
"login": "mtodd"
}
}
}
]
}
}
}
}
}
@jamesmartin
Copy link
Author

Use input:

{"login": "my-org-login"}

@jasontempleman-eaton
Copy link

What if you have 1000 entries?

@jamesmartin
Copy link
Author

What if you have 1000 entries?

You could try paging through the entries using a cursor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment