Skip to main content
SAML single sign-on is the foundation of enterprise identity on GitHub. Without it, GitHub becomes an identity silo: engineers end up with separate credentials for their corporate identity and for GitHub, and deprovisioning requires separate actions for each system. A clear way to think about SAML is as a security checkpoint at a federal building. In this analogy, GitHub is the building and your corporate identity provider (IdP)—for example, Okta or Azure AD—is the federal ID office that issues and validates IDs.
A diagram showing a GitHub-styled federal building with a SAML checkpoint where two people interact at a security kiosk. To the right is a separate Federal ID Office and identity providers (Okta, Azure AD) that issue IDs.
When you arrive, the guard (GitHub) doesn’t maintain the identity roster. Instead the guard queries the federal ID office (your IdP). If the IdP confirms the person is authorized, the guard issues a temporary visitor stamp—the SAML session token—that allows access.
Illustrated diagram titled "The Guard Calls the ID Office" showing a guard at a GitHub building checking with an ID Office/IdP about a person. Arrows show the query "is this person cleared?" and the response "yes, cleared."
That SAML stamp is time-limited. In GitHub’s common configuration the session lasts about 24 hours, after which the user must revalidate with the IdP to receive a new stamp.
A simple infographic showing that a visitor pass is valid for 24 hours. It shows a checked "Visitor Pass" labeled Today, a 24-hour timer in the middle, and a "New Visitor Pass" for Tomorrow.
Because GitHub relies on the IdP to validate sessions, GitHub’s availability for sign-in becomes coupled to your IdP’s availability. If the IdP is down, users cannot obtain a valid SAML session—even if GitHub itself is fully functional.
An illustration of several people queued on the left who are blocked from entering an "ID Office" on the right because the phone system is down. A caption/button below reads "Nobody gets in."
This coupling is vital to communicate when planning an SAML rollout: SAML SSO moves authentication responsibility toward the IdP and makes GitHub sign-in dependent on the IdP’s health. Enabling vs. Enforcing SAML SSO
  • Enabling SAML single sign-on makes the IdP integration available to organization members but does not force its use.
  • Enforcing SAML single sign-on requires every access attempt to the organization to be validated against an active SAML session.
A frequent production gotcha: enforcing SAML before verifying at least one admin is logged in through the IdP can immediately lock administrators out of the organization after saving the configuration. Always confirm an administrator has an active IdP session and test the SAML configuration before switching enforcement on.
A slide titled "Test Before You Enforce" showing a SAML single sign-on configuration panel. It displays fields for Sign-on URL and Issuer, a "Test SAML configuration" button marked "Test successful," a "Require SAML single sign-on" checkbox, and a Save button.
Before enforcing SAML for an organization:
  1. Ensure at least one admin is signed in via the IdP,
  2. Use GitHub’s Test SAML configuration to verify metadata, certificate, sign-on URL, and issuer, and
  3. Communicate the change and rollout plan to developers and CI owners.
Impact on Existing Credentials (PATs and SSH Keys) When you enforce the “Require SAML single sign-on” option, existing credentials such as personal access tokens (PATs) and SSH keys stop granting access to the organization until those credentials are explicitly authorized for the organization.
A slide titled "Existing Credentials Stop Working" showing a flow where a "Production incident" triggers "Enforce", causing personal access tokens and SSH keys to stop working. A note at the bottom indicates those credentials are "not SAML authorized."
Those tokens and SSH keys are not deleted or expired; they simply lack the SAML authorization stamp for the newly protected organization. The most common symptoms you’ll see are CI job failures and developer workflows failing with HTTP 401 or SSH permission errors. Example terminal output:
Remediation steps are manual for each credential owner:
  • Developers must open their GitHub account settings, find the relevant personal access token or SSH key, and explicitly click Authorize for the organization.
  • For CI systems, update the credentials on the account that owns the token or key, then authorize those credentials for the organization.
  • Document and distribute step-by-step instructions to all affected teams before enforcement.
Do not enforce SAML without coordination. Expect CI failures, blocked pushes, and a surge of help-desk tickets. Schedule enforcement during a maintenance window and pre-authorize or prepare instructions for token and SSH key authorization.
Practical checklist before enforcing SAML SSO Following these practices will significantly reduce the risk of accidental lockouts and production outages when adopting SAML single sign-on for your GitHub organization. Links and references

Watch Video