Skip to main content
This guide walks through configuring Okta as a SAML identity provider (IdP) and enforcing SAML single sign-on (SSO) for a GitHub organization. You can enable SAML at the enterprise level (applies to all organizations under the enterprise) or at the organization level (applies only to one org). Follow the steps in order and verify each step before proceeding to the next.
Before you begin: create an Okta admin account and make sure you have GitHub org admin privileges. Keep a second admin account available during testing in case enforcement removes users who have not yet authenticated via the IdP.

1. Choose where to apply SAML

Decide whether SAML will be enforced across the entire GitHub Enterprise or only for a specific organization.

2. Prepare Okta

  1. Create an Okta account (trial accounts are available).
  2. Add at least one administrative user (Super Admin recommended).
  3. If your organization requires MFA, enroll the admin user in Okta Verify (or other configured factor).
  4. Sign in to the Okta Admin Console and verify you can access Directory / People to view and manage users.

3. Add the GitHub application in Okta

  1. In the Okta Admin Console, open Applications -> Browse App Catalog (or Browse App Integration Catalog).
  2. Search for “GitHub” and select the integration that matches your use case:
    • For an organization-level setup: choose “GitHub Enterprise Cloud — Organization”.
  3. Click Add Integration, give the app a descriptive name (for example, “GHEC Org”), and enter your GitHub organization name when prompted (example: game-devstudio).
  4. Finish creating the application.
A screenshot of the Okta Admin Console open to the "Browse App Integration Catalog" page, showing a search for "github" with GitHub integration results. The left sidebar navigation displays sections like Applications, Directory, Security, and Workflow.

4. Retrieve SAML metadata from Okta

Open the Okta application you created and navigate to the Sign On tab (or click View SAML Setup Instructions). Copy the SAML details you will paste into GitHub. Key values to copy:
A screenshot of the Okta Admin Console displaying the Applications section with SAML configuration and metadata details (metadata URL, sign-on URL, copy buttons). The left sidebar shows navigation items (Directory, Customizations, Applications) and a top banner notes "30 days left in your trial" with a signed-in user.
Example placeholder values (replace these with the values from your Okta app):

5. Assign users and groups to the Okta application

  1. In the Okta app configuration, go to the Assignments (or Assign) tab.
  2. Add the people and/or groups who should be allowed to authenticate to GitHub (for example your admin account alice@example.com).
A screenshot of the Okta Admin Console with a modal titled "Assign GEC-Org to People" and the Username field populated (alice.gh900+ADMIN@gmail.com). The modal shows "Save and Go Back" and "Cancel" buttons.
Tip: Assign groups from your directory to simplify management for large teams. If you plan to use automated provisioning, pair this with SCIM (see Next steps).

6. Test the SAML connection

  • Use Okta’s built-in Test button or GitHub’s SAML test flow to verify the assertion and attribute mappings.
  • The test should redirect to GitHub after successful authentication. If the assigned Okta user has MFA and is signed in, the test will usually complete automatically.
Example test output (use your actual Okta values):
Because the admin user was signed in and had MFA configured, the test completed and redirected back to GitHub confirming success.

7. Configure SAML in the GitHub organization and require SSO

  1. In GitHub, go to your organization: Settings -> Authentication and security -> SAML.
  2. Paste the values copied from Okta:
    • Sign-on URL
    • Issuer
    • X.509 public certificate
  3. Save the configuration and test the “Sign in with SSO” flow for an admin account.
  4. After verifying the initial authentication, you can choose to require SAML single sign-on for all organization members. Note that requiring SSO will remove any members who have not authenticated via the IdP.
A screenshot of a GitHub organization overview page for "game-devstudio." A banner says single sign-on has been enabled with a green "Authenticate your account" button, and the org avatar and starter tasks are shown below.
Requiring SAML single sign-on will remove organization members who have not yet authenticated using your identity provider. Notify members and provision accounts in Okta (or another IdP) before enforcing SSO to avoid accidental lockouts.

8. Confirm and apply “Require SAML”

  • When you enable “Require SAML single sign-on,” GitHub will display a confirmation dialog listing members who will be removed because they have not authenticated with the IdP.
  • Review the list carefully and confirm only when you have verified provisioning and membership coverage.
A GitHub organization security settings page showing a confirmation dialog to require SAML SSO, warning that two members will be removed. The modal lists the affected members and has a red "Remove members and require SAML single sign-on" button.
After confirming:
  • GitHub saves the SAML configuration and the “require SSO” setting.
  • Removed users will receive notification emails and must be provisioned again via your IdP or via SCIM to regain access.
Example temporary codes or audit tokens that GitHub may display during the process (example values shown):

9. Next steps and recommendations

  • For large organizations, enable SCIM provisioning to automate user creation, team membership, and de-provisioning from Okta into GitHub.
  • Test a provisioning workflow for a subset of users before enforcing SSO organization-wide.
  • Keep a recovery plan: maintain at least one unreachable (backup) admin flow or emergency access method to avoid losing admin access during configuration.
  • Document your IdP group-to-GitHub-team mappings and attribute mappings used in SAML assertions.
Relevant documentation and references: That completes the SAML setup flow using Okta and enabling SSO for a GitHub organization.

Watch Video