8000 Create org-saml-identities-filtered-by-nameid-username.graphql · github/platform-samples@5402450 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5402450

Browse files
authored
Create org-saml-identities-filtered-by-nameid-username.graphql
1 parent e5d5c0f commit 5402450

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# You will need to replace <ORG_NAME> and <SAML Name ID> with the actual GitHub organization name and the SAML `NameID` value that you're searching stored external identities for in the GitHub organization.
2+
# For GitHub Enterprise Cloud organizations that have SAML configured at the organization level, this will query the stored SAML `nameId` and SCIM `userName` external identity values in the GitHub organization, 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.
3+
4+
# This query will not print out a user username (`login`) value if there is not a GitHub user account linked to this SAML identity.
5+
# Pagination shouldn't be needed since there shouldn't be multiple entries that have the same SAML `NameID` or SCIM `userName`. However, for more information on pagination. There is also an example of pagination in simple-pagination-example.graphql.
6+
7+
query OrganizationIdentitiesBySAMLNameID {
8+
organization(login: <ORG_NAME>) {
9+
samlIdentityProvider {
10+
externalIdentities(userName:"<SAML Name ID>", first: 25) {
11+
edges {
12+
node {
13+
samlIdentity {
14+
nameId
15+
}
16+
user {
17+
login
18+
}
19+
}
20+
}
21+
pageInfo {
22+
endCursor
23+
}
24+
}
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)
0