8000 Creating new filtered SAML linked identity queries for GHEC non-EMUs by stacycarter · Pull Request #769 · github/platform-samples · GitHub
[go: up one dir, main page]

Skip to content

Creating new filtered SAML linked identity queries for GHEC non-EMUs #769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 3, 2025

Conversation

stacycarter
Copy link
Contributor
@stacycarter stacycarter commented Feb 28, 2025

This PR creates two new sample GraphQL queries for GHEC non-EMUs:

  • org-saml-identities-filtered-by-nameid-username.graphql
  • enterprise-saml-identities-filtered-by-nameid.graphql

These queries can be used to find a stored external identity that has a specific SAML nameId or SCIM userName value.

For example, this can help an enterprise or organization owner identity the root cause when a user receives the error message below (basically, it can show which GitHub user is already linked to the external identity in the organization/enterprise):

Your GitHub user account [GitHub username] is currently unlinked. However, you are attempting to authenticate with your Identity Provider using [IdP user account] SAML identity which is already linked to a different GitHub user account in the [organization/enterprise]. Please reach out to one of your GitHub [organization/enterprise] owners for assistance.

@stacycarter stacycarter marked this pull request as ready for review March 1, 2025 01:44
@Copilot Copilot AI review requested due to automatic review settings March 1, 2025 01:44
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more

@stacycarter stacycarter merged commit 591cef7 into master Mar 3, 2025
5 checks passed
@johnaAr555 johnaAr555 mentioned this pull request Apr 4, 2025
Copy link
@johnaAr555 johnaAr555 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will need to replace <ENTERPRISE_SLUG> and with the actual GitHub enterprise slug and the SAML NameID value that you're searching stored external identities for in the GitHub enterprise.

For GitHub Enterprise Cloud enterprises that have SAML configured at the enterprise level, this will query the stored SAML nameId external identity values in the GitHub enterprise, and if one is found that matches the value specified for <SAML Name ID>, it will print out the SAML nameId and GitHub username for that stored external identity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0