Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd query that lists SAML external identities for an Organization #168
Comments
|
This query was super helpful for us as we're primarily using v3 and couldn't see a way to do this there. I found the token needs |
|
This query was also super helpful for us - v3 provides their SCIM endpoint (https://developer.github.com/v3/scim/) which gets us close, but does not provide a true way to tie a GitHub identity to a SAML identity. Using this query in v4 we are able to pull our user's verified domain email addresses and associate it to their github handle, making our notification process a lot easier. |
|
@AjkayAlan, I'm testing on the same where the email address for SAML authentication is different from github registered email address, can you please share us the query to trigger in GraphQL |
|
@kamaltejaaol Unfortunately my org policy does not allow me to share code easily, specifically code I developed for our organization. What we ended up doing was using the query provided by @osowskit above to get the SAML nameId, which corresponded to our user's primary email address associated to their enterprise account (the same address we would send emails on). Additionally, the query above gets you the user login, which is the actual github login of the associated user. From there, you can just make a key value pair list of github login to enterprise email address. Once you have that, you should be off to the races. In our case, we had to revoke PAT and SSH keys over a specified age limit using the credential authorizations API (https://developer.github.com/v3/orgs/#list-credential-authorizations-for-an-organization). That returns the github login, which we then look up against the list of login/email kvp's. From there, we were able to notify the users in advance that they needed to rotate their credentials to avoid disruption. |
|
@AjkayAlan, i understand the corporate security policies, but thanks for giving the detailed explanation, i will try to work it out. Thanks again. |
|
Hi, @osowskit below is the return. |
|
Just did a bit more research on the issue, could it be related to SCIM is not enabled? |


Business Plan hosted customers with SAML would like a way to programmatically query information about a GitHub user account's SAML identity. The following is a GraphQL query that accomplishes this for an Organization.
/cc @francisfuzz as you might be able to track down the author to see if they want to add this☝️