Integrations · SAML 2.0

GitHub Enterprise SSO

Configure SAML 2.0 SSO for GitHub Enterprise Server and GitHub Enterprise Cloud (organization-level SAML). Covers SCIM provisioning for automatic team and membership sync.

Two products, same guide: GitHub Enterprise Server (GHES) and GitHub Enterprise Cloud (GHEC) both use SAML 2.0 for SSO but configure it in different panels. Sections below are labelled accordingly.

Prerequisites


Step 1 — Clavex SAML Metadata

ParameterValue
IdP Entity IDhttps://id.acme.eu/acme/saml
SSO URLhttps://id.acme.eu/acme/saml/sso
Certificatehttps://id.acme.eu/acme/saml/idp/metadata → X509Certificate

Step 2a — GitHub Enterprise Server Configuration

  1. Go to Site AdminManagement ConsoleAuthentication
  2. Select SAML
  3. Fill in:
    FieldValue
    Single sign-on URLhttps://id.acme.eu/acme/saml/sso
    Issuerhttps://id.acme.eu/acme/saml
    Signature methodRSA-SHA256
    Digest methodSHA256
    Name identifier formatPersistent
    CertificatePaste Base64 from Clavex metadata
  4. Under Attribute statements, map:
    GitHub attributeSAML attribute
    usernamepreferred_username
    emailemail
    full_namename
    keys(optional) ssh_keys
  5. Click Save settings and then Test SAML configuration

Step 2b — GitHub Enterprise Cloud (Organization)

  1. Go to your GitHub Organization → SettingsAuthentication security
  2. Check Enable SAML authentication
  3. Fill in:
    FieldValue
    Sign-on URLhttps://id.acme.eu/acme/saml/sso
    Issuerhttps://id.acme.eu/acme/saml
    Public certificatePaste full PEM certificate from Clavex metadata
    Signature methodRSA-SHA256
    Digest methodSHA256
  4. Click Test SAML configuration before saving

Step 3 — Register GitHub as SP in Clavex

Admin API (curl)
# GitHub Enterprise Server $ curl -X POST https://id.acme.eu/api/v1/organizations/acme/saml/sp \ -H 'Authorization: Bearer $ADMIN_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "entity_id": "https://github.acme.eu", "acs_url": "https://github.acme.eu/saml/consume", "name_id_format": "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", "sign_assertions": true }'
# GitHub Enterprise Cloud $ curl -X POST https://id.acme.eu/api/v1/organizations/acme/saml/sp \ -H 'Authorization: Bearer $ADMIN_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "entity_id": "https://github.com/orgs/acme-corp", "acs_url": "https://github.com/orgs/acme-corp/saml/consume", "name_id_format": "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", "sign_assertions": true }'

Step 4 — SCIM Provisioning (optional)

GitHub Enterprise Cloud supports SCIM for automatic user and team provisioning. Enable it in Clavex Admin → Provisioning → add a SCIM target pointing at:

FieldValue
SCIM base URLhttps://api.github.com/scim/v2/organizations/acme-corp
AuthenticationBearer token (GitHub personal access token with admin:org)
Supported operationsCreate, Update, Deactivate users; Sync groups as teams

Troubleshooting

SymptomCauseFix
SAML response was not valid Certificate mismatch or assertion expired Verify certificate in GitHub matches Clavex IdP cert; check clock sync
Username attribute missing preferred_username not in assertion Add custom attribute mapper in Clavex for the preferred_username claim
SCIM not syncing PAT expired or wrong scope Regenerate GitHub PAT with admin:org and read:user scopes
Members still see personal login SAML not enforced yet Enable Require SAML SSO in GitHub Org Settings → Authentication Security