On this page
  1. Three models, one decision
  2. Choosing between them
  3. Hardening SAML SSO on personal accounts
  4. Hardening Enterprise Managed Users
  5. Shared controls for both models
  6. Monitoring identity events
  7. Rollout checklist
  8. References

Personal GitHub accounts are convenient and dangerous in the same breath. The account belongs to the employee, it existed before they joined, it will exist after they leave, and it can hold forks, tokens and SSH keys that your company never sees. GitHub Enterprise Cloud gives you two ways to tie that identity to your corporate identity provider (IdP): SAML single sign-on on top of personal accounts, or Enterprise Managed Users (EMU), where the IdP owns the accounts outright.

This guide explains the difference, how to choose, and the settings that matter once the integration is live. Both options require GitHub Enterprise Cloud.

Three models, one decision

ModelWho owns the accountWhere SSO is enforcedTypical fit
Organization SAML SSOThe userOne organizationSingle organization, open source contributors among staff
Enterprise SAML SSOThe userEvery organization in the enterpriseSeveral organizations, personal accounts accepted
Enterprise Managed UsersThe enterprise, via the IdPEvery resource, alwaysStrict lifecycle control, regulated environments

With SAML SSO on personal accounts, a user signs in to GitHub with their own credentials and then has to complete an SSO session with your IdP before accessing your organization's resources. The account itself, its public contributions and its other organization memberships are outside your control.

With EMU, the IdP creates the account through SCIM, sets the username (suffixed with your enterprise shortcode, for example jdoe_acme), the display name and the email, and suspends it when the person leaves. Managed users cannot create public content, cannot collaborate on repositories outside the enterprise, and cannot be invited from outside. That restriction is the security feature, and also the main reason teams hesitate: engineers who contribute to open source need a separate personal account for that work.

Choosing between them

Pick EMU when:

  • You need deprovisioning to be immediate and complete, driven by HR systems through the IdP.
  • You must prevent data leaving through public repositories, gists or forks to personal namespaces.
  • You want your IdP's conditional access policy (CAP) applied to GitHub sessions and tokens. With OIDC on Microsoft Entra ID, GitHub enforces the IdP's IP conditions on web sessions and on tokens.

Stay with SAML SSO on personal accounts when:

  • Staff routinely contribute to public projects from the same account and you accept that trade-off.
  • You run a single organization and cannot yet justify the migration.

Moving from personal accounts to EMU is a migration, not a toggle. EMU lives in a separate enterprise account; repositories have to be transferred or migrated, and every user gets a new account. Plan it like a tenant migration.

Hardening SAML SSO on personal accounts

If you stay with SAML SSO, configure it at the enterprise level rather than per organization whenever you have more than one organization. Enterprise SSO covers all organizations, including new ones, and removes the risk of an organization being created without SSO.

Then tighten the details:

  1. Enable and require SAML SSO. Configuring SSO and requiring it are separate steps at the organization level. Until it is required, members can still access resources without an SSO session. At the enterprise level, SSO is enforced once saved.
  2. Store the recovery codes. Download the SSO recovery codes and keep them in your break-glass vault. If the IdP is down or misconfigured, they are the only way for an owner to bypass SSO.
  3. Use SCIM where possible. SCIM lets the IdP revoke organization membership when access is removed. Without SCIM, removing a user in the IdP blocks new SSO sessions, but the user stays a member of the organization until someone removes them.
  4. Use team synchronization. With Entra ID or Okta, team sync maps IdP groups to GitHub teams so repository access follows group membership instead of manual invites.

Credential authorization

SAML SSO does not stop at web sessions. Personal access tokens (classic) and SSH keys must be authorized for each SSO-enabled organization before they can access its resources. Users do this from Settings > SSH and GPG keys or Settings > Personal access tokens with the Configure SSO menu.

Owners can see and revoke these authorizations:

shell
# List credential authorizations for an SSO organization
gh api --paginate "/orgs/ACME/credential-authorizations" \
  --jq '.[] | [.login, .credential_type, .credential_authorized_at, .credential_accessed_at] | @tsv'

# Revoke one
gh api -X DELETE "/orgs/ACME/credential-authorizations/CREDENTIAL_ID"

Review that list during offboarding. Revoking SSO for a user in the IdP does not automatically remove an authorized SSH key from their personal account; removing them from the organization does.

Hardening Enterprise Managed Users

EMU removes many risks by design, but it introduces new high-value accounts and a hard dependency on the IdP.

Protect the setup user

Every EMU enterprise has a setup user, named with the _admin suffix (for example acme_admin). It is the only account that does not come from the IdP, and it is an enterprise owner. It configures authentication and is your recovery path.

  • Use a strong, unique password stored in a vault, and enable 2FA with a security key.
  • Do not use it for daily administration; assign enterprise owner roles to IdP-provisioned users.
  • Save the enterprise recovery codes for SSO alongside it.

OIDC or SAML

EMU supports SAML with Entra ID, Okta and PingFederate, and OIDC with Entra ID. If your IdP is Entra ID, prefer OIDC: it is what enables support for the IdP's conditional access policies, so a GitHub session or token used from an IP address your CAP blocks is rejected.

Provision through groups

Assign the GitHub application to IdP groups, not individuals, and connect those groups to GitHub teams. Membership in a team then comes only from the IdP. Avoid granting repository access to individual managed users; it bypasses the group model and is easy to forget.

Understand what managed users can still do

Managed users can still create personal access tokens, SSH keys and private repositories in their own namespace inside the enterprise. Apply the token policies from the PAT and GitHub Apps guide, and consider the enterprise policy that restricts repository creation in user namespaces.

Shared controls for both models

Whatever model you run, these enterprise-level settings complement SSO:

  • IP allow list: restrict access to enterprise resources to known egress ranges. It applies to web, API and Git access, and to GitHub Apps unless you allow their configured lists. Check that GitHub-hosted runners still work; they need either a larger runner with static IPs or an exception, because their IPs are not in your ranges.
  • Source IP disclosure for audit log events, so that streamed events carry the actor's IP address (see the audit log guide).
  • Two-factor policy for the remaining non-SSO accounts: outside collaborators, the setup user and billing managers. The organization baseline covers enforcing secure 2FA methods.

Monitoring identity events

Add alerts for these audit log actions:

  • org.disable_saml and business.disable_saml: SSO turned off.
  • org.update_saml_provider_settings and business.update_saml_provider_settings: IdP certificate or URL changed, a classic way to redirect authentication.
  • org.sso_response with failures, and spikes in org.credential_authorization_grant.
  • external_identity.deprovision (SCIM) to confirm that deprovisioning actually happens.

An SSO configuration change outside a change window should page someone. It is the single setting that can silently hand control of authentication to another IdP.

Rollout checklist

  1. Choose the model and get the IdP team involved early.
  2. Configure SSO at the enterprise level, test with a pilot organization or group.
  3. Enable SCIM and team sync, then map IdP groups to teams.
  4. Store recovery codes and setup user credentials in the break-glass vault.
  5. Require SSO, then review credential authorizations after the first week.
  6. Add the audit log alerts above and test them with a harmless change.

References

Tags:organizationidentity

Written by

Florian Amette, Security Engineer & Editor

Security engineer writing practical hardening guides for GitHub organizations, repositories and CI/CD pipelines, with a focus on software supply-chain security.