Unable to fetch NameID with graphql query - github enterprise

Hello,

Trying to fetch list of nameId from github enterprise with following query but getting ‘{‘data’: {‘resource’: None}}’. Anyone could help me to understand why the output is None?
query {
resource(url: “https://”) {
… on Organization {
samlIdentityProvider {
externalIdentities(first:10) {
nodes {
scimIdentity {
username
}
samlIdentity {
nameId
}
user {
login
email
}
}
}
}
}
}
}

@BharanidharanMurugan
this slightly different query on ‘organizaton’ works for me

query OrganizationSAMLIdendities($org: String!) {
organization(login: $org) {
samlIdentityProvider {
ssoUrl
externalIdentities(first: 100) {
edges {
node {
guid
samlIdentity {
nameId
}
user {
login
}
}
}
}
}
}
}

@byrneh Thank you very much! :slightly_smiling_face: This works in github enterprise cloud and not in github enterprise server (on-premise) yet.
This was the response from github => “there isn’t a way to get the SAML mappings via API at this time on GitHub Enterprise Server” but they do have feature request itseems.

@BharanidharanMurugan, that is disappointing, one of a few weaker administration functionality aspects compared to the excellent developer/user product functionality.

Hopefully less impacting for GitHub Enterprise Server if your GitHub names is derived from SAML assertions for name/email address.

The feature requests aspects is always a bit of mystery… as there in no mechanism to view, register and track such things.

We don’t have option to retriew ‘nameId’ through API yet though, we have command line utility ‘ghe-saml-mapping-csv’ as alternative to get this data, adding this info for anyone else.
And, ofcourse as @byrneh suggested ’ checking if github names are derived from SAML assertions for name/email address’ is another option which we could look into.

1 Like