Join our Newsletter — 33% off our NHI Course
Home› Guides› GitHub Enterprise Managed Users: When EMU Fits and…
Guide Identity & Access Management (IAM)

GitHub Enterprise Managed Users: When EMU Fits and How to Roll It Out Securely

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 15 min read
On this page

Developers who reach company code through their own personal GitHub accounts leave the organisation with only partial control over who those people are, what they publish and when their access really ends. GitHub Enterprise Managed Users (EMU) moves that control to your identity provider: the IdP creates the accounts, decides who can sign in and removes access when someone leaves. That control comes with real changes to how developers work, so EMU is a deliberate choice rather than a default. This guide explains when EMU fits, how identity provider and SCIM setup work, a phased rollout, and how to secure managed accounts, tokens and the audit trail. It is written for platform engineering and identity teams planning or running a GitHub Enterprise Cloud enterprise. Repository, branch and Actions hardening are covered in the GitHub and GitHub Actions Security Guide, and self-hosted appliances in GitHub Enterprise Server Security.

This is an independent guide from NHI Mgmt Group, based on GitHub's public documentation as of November 2026. It is not sponsored or reviewed by GitHub. Product features change, so confirm settings against GitHub's current documentation.

Key takeaways

  • EMU is an enterprise type, chosen up front. An enterprise that already uses personal accounts needs a new enterprise account to move to EMU, so decide before you build organisations, and talk to GitHub early if you are migrating.
  • The IdP becomes the source of truth. Usernames, profile name, email, enterprise role and (optionally) organisation and team membership all come from the IdP through SAML or OIDC plus SCIM; managed users cannot edit them on GitHub.
  • Managed accounts stay inside the enterprise. They cannot create public content or contribute outside the enterprise, which removes a class of accidental code and secret exposure but also means open source work needs a separate personal account.
  • One account sits outside the IdP. The setup user (shortcode_admin) is the only enterprise owner not provisioned by SCIM; protect it, its recovery codes and the SCIM token it creates as break-glass credentials.
  • Tokens and logs need policy, not trust. Set enterprise personal access token restrictions and maximum lifetimes, consider OIDC with Conditional Access where you use Entra ID, and stream the audit log, including Git events, to your SIEM from day one.

What Enterprise Managed Users are

With EMU, your IdP provisions user accounts that exist only for your enterprise on GitHub.com, or on your own GHE.com subdomain if you use GitHub Enterprise Cloud with data residency. Users authenticate at the IdP to reach enterprise resources, and you control usernames, profile data, organisation membership and repository access from the IdP.

How managed usernames are built

GitHub normalises an identifier from the IdP and appends an underscore and your enterprise shortcode, for example mona-cat_octo. The shortcode is an alphanumeric string of three to eight characters, unique to the enterprise and fixed once created. On GHE.com the shortcode is randomly generated and hidden but still appended, and the username limit is 30 characters instead of 39. Normalisation rules to plan for:

  • Email-style identifiers: only the characters before the @ are used, so two people with the same local part in different domains will collide.
  • Entra ID: the username comes from the UPN before the @, excluding #EXT# for guest accounts.
  • Conflicts and length: a normalisation conflict fails provisioning with HTTP 409, and an over-long username fails with HTTP 400. Fix it by changing the userName value or mapping in the IdP; GitHub Support does not help with attribute mappings.
  • Email changes: the IdP provides one email address, and changing it in the IdP unlinks the user from contribution history tied to the old address. Use a stable address.

EMU and personal accounts compared

AreaEnterprise with personal accountsEnterprise Managed Users
Who creates the accountEach user creates and owns their GitHub.com accountYour IdP provisions the account through SCIM
AuthenticationGitHub credentials, optionally with SAML SSO to organisations or the enterpriseIdP only, through SAML or OIDC; no GitHub password or GitHub 2FA is stored for managed users
Username and profileChosen by the userNormalised IdP identifier plus _shortcode; name and email set by the IdP
ProvisioningUser provisioning not available; SCIM can provision access to individual organisationsFull account lifecycle from the IdP, including suspension on deprovisioning
Public contentUsers can publish public repositories, gists and Pages sitesNo public repositories, no gists of any visibility, no Pages sites visible outside the enterprise
Outside collaborationSame account works on open source and company codeContributions only inside the enterprise; read-only view of public GitHub.com
Identity providersAny IdP supporting SAML 2.0Partner IdPs (Entra ID, Okta, PingFederate) or other systems meeting GitHub's SAML 2.0 and SCIM 2.0 guidelines
Data residency (GHE.com)Use EMURequired

When EMU fits and when it does not

The choice turns on how much control you need over identity compared with how much your developers work in public.

  • Choose EMU when: policy requires that company code is reached only through company-issued identities; you need joiner, mover and leaver changes to flow from the IdP without manual clean-up; you need GitHub Enterprise Cloud with data residency (EMU is required there); or you want to remove the risk of staff pushing company code or secrets to public repositories from the same account.
  • Choose personal accounts when: many engineers contribute to open source as part of their job, your workflows depend on public repositories, gists or public Pages sites, or you cannot run SCIM from a supported IdP.
  • Plan for the split-account cost: with EMU, external open source work needs a separate personal account. GitHub notes this adds switching complexity and a risk of leaks, so pair EMU with guidance on which account to use where, and with secret scanning on both sides.
  • Small versus large organisations: a small team without a mature IdP group model may find the setup and IdP dependency outweigh the benefit. Large or regulated organisations usually gain most, because account lifecycle and access reviews then follow the same IdP processes as every other application.
  • Migration timing: moving an existing personal-account enterprise means a new enterprise account and moving organisations and repositories. GitHub says this may take time or cost and asks customers to contact its Sales team.

Restrictions to plan for

These are design properties of managed accounts. Plan workflows around them before go-live rather than discovering them in week one.

AreaHow managed accounts behaveWhat to plan
Public GitHub.comCan view public repositories, but cannot push, open issues or pull requests, comment, react, star, watch or fork outside the enterprise, or follow outside usersPersonal account guidance for open source; an internal process for reporting upstream bugs
RepositoriesEnterprise organisations create private and internal repositories only; personal repositories, if policy allows them, must be privateDecide the personal repository policy; use internal visibility for inner source
GitHub AppsCannot install apps on their user accounts unless the app is privileged; organisation owners install on organisations; only enterprise owners buy paid appsAn app request and review route owned by organisation owners
ActionsCannot create workflow templates; GitHub-hosted runners are not available for repositories owned by user accountsKeep automation in organisation repositories
CopilotAccess comes through Copilot Business or Enterprise; Copilot Free and Pro sign-up is not availableAssign Copilot seats through IdP groups or organisation settings

Identity provider and SCIM setup

GitHub's partner IdPs for EMU are Entra ID, Okta and PingFederate. GitHub recommends one partner IdP for both authentication and provisioning; it does not expressly support mixing partners, and Okta with Entra ID for SSO and SCIM, in either order, is explicitly unsupported (the SCIM API returns an error). Other systems must follow GitHub's integration guidelines, using SAML 2.0 for authentication and SCIM 2.0 against GitHub's REST API, and GitHub Support may not be able to help with them.

Identity providerAuthentication options for EMUProvisioningNotes from GitHub docs
Entra IDOIDC (recommended) or SAMLSCIMOIDC enables Conditional Access Policy IP checks; use SAML for each additional enterprise provisioned from the same tenant
OktaSAMLSCIMOkta "Deactivate" soft-deprovisions; Okta never sends hard-deprovision calls
PingFederateSAMLSCIMConfigure removal as "Disable", not "Delete", to avoid irreversible hard deprovisioning
Other SAML 2.0 and SCIM 2.0 systemsSAMLSCIM via the REST APIMust meet GitHub's integration guidelines; support for problem resolution may be limited

Setup sequence

  1. Create the enterprise: an enterprise with EMU enabled, on GitHub.com or your GHE.com subdomain. Choose the shortcode with care, because it cannot change.
  2. Secure the setup user: open the invitation in a private browser window, set a long password, enable 2FA, download the enterprise recovery codes and store all of it in the company password vault. The setup user is shortcode_admin and is the first enterprise owner.
  3. Create the SCIM token: signed in as the setup user, create a personal access token (classic) with at least the scim:enterprise scope. GitHub's guidance is to set it to never expire, so treat it as a high-value secret with a named owner and a rotation procedure. See the GitHub Personal Access Tokens Security Guide.
  4. Configure authentication: SAML or OIDC as the table above allows. See the SAML Security Guide.
  5. Configure SCIM: paste the token into the IdP's GitHub EMU application and map userName deliberately. See the SCIM Provisioning Guide.
  6. Map IdP groups to teams: once sign-in and provisioning work, connect IdP groups to teams to drive organisation membership and licence assignment.

Rollout plan

  1. Design the IdP model: one IdP group per team or access level, owners for each group, and a userName mapping tested against your whole directory for 409 collisions and length limits before anyone is provisioned.
  2. Pilot ring: provision a small platform team, connect one organisation, and test sign-in, team sync, Actions, Codespaces, Copilot seat assignment and the apps your teams rely on.
  3. Test deprovisioning before go-live: disable a pilot user in the IdP and confirm suspension, team removal and the audit events listed below. Then re-enable and confirm reinstatement. Soft-deprovisioned accounts can only be restored from the same IdP user.
  4. Turn on policies: personal access token restrictions and lifetimes, repository creation and visibility policies, and audit log streaming, before the main migration wave.
  5. Migrate in waves: move organisations and repositories team by team, with a cut-off date for old personal-account access.
  6. Rollback position: keep the previous enterprise and its organisations in place until each wave is accepted. Avoid any IdP action that hard-deprovisions (a SCIM DELETE, Entra hard deletion, a PingFederate "Delete" setting): hard-deprovisioned accounts cannot be restored and their personal tokens, SSH keys and user-owned repositories are deleted.

Securing managed user accounts and tokens

Personal access token policies

Under Policies, Personal access tokens, enterprise owners set three policies. For EMU enterprises, enterprise-level token policies also apply to user namespaces, because the enterprise owns the accounts.

PolicyOptionsSuggested setting
Restrict access via personal access tokens (set separately for fine-grained and classic)Allow organisations to configure (default), Restrict, AllowRestrict classic tokens; allow fine-grained tokens. Restriction leaves SSH keys created by those tokens working, so review keys too
Require approval of fine-grained personal access tokensAllow organisations to configure (default), Require approval, Disable approvalRequire approval for organisations holding sensitive code
Set maximum lifetimes for personal access tokensLifetime in days; fine-grained default 366 days, classic none by default; Exempt administrators checkboxSet a short maximum for both types. Non-compliant tokens are blocked from the organisation, not revoked

GitHub warns that EMU enterprises which do not exempt administrators from the maximum lifetime policy accept a risk of service interruption, because the SCIM token is a never-expiring classic token held by the setup user. Either exempt administrators and govern the setup user tightly, or plan scheduled SCIM token rotation inside the lifetime. For automation, prefer GitHub Apps over tokens tied to people; see GitHub Apps vs Personal Access Tokens vs OAuth Apps.

OIDC and Conditional Access

With OIDC SSO, available with Entra ID, GitHub checks the IdP's Conditional Access Policy IP conditions for web use, when a member's IP address changes, and on each authentication with a personal access token or SSH key tied to a user account. Points to plan for:

  • Scope: GitHub enforces IP conditions, not device compliance conditions, and MFA is enforced at IdP sign-in. Deploy keys are outside CAP because they do not act for a user.
  • Apps: for user-to-server requests GitHub sends the app server's IP to the IdP; app-as-installation requests are always allowed. Collect app IP ranges or exempt installed apps from the IdP allow list.
  • Actions and Codespaces: workflows using personal tokens are likely to be blocked, and Codespaces and github.dev may be unavailable because of dynamic IPs. Use GitHub Apps or exempt service accounts, or allow the relevant ranges.

See the Conditional Access Guide for policy design.

SSH keys and offboarding

Managed users authenticate Git over SSH with keys tied to their accounts, and those keys are subject to CAP IP checks under OIDC. Hard deprovisioning deletes personal access tokens, SSH keys, GPG keys and app authorisations; soft deprovisioning suspends the account and these items are restored on reinstatement. Review keys and tokens in your access reviews rather than relying only on suspension, and see How to find unused GitHub deploy keys and SSH keys.

Audit log streaming and detection

Stream the enterprise audit log, which covers audit events and Git events across the enterprise, to Amazon S3, Azure Blob Storage, Azure Event Hubs, Datadog, Google Cloud Storage or Splunk (Microsoft Purview is supported for Copilot agent session events only). Enable "Enable API Request Events" under Audit log settings for security-relevant API calls. Each stream gets a health check every 24 hours, owners are emailed if it is misconfigured, and it must be fixed within six days or events may be dropped. A paused stream buffers events for seven days; Datadog rejects logs older than 18 hours, so keep pauses short there.

EventWhat it showsResponse
external_identity.provision / external_identity.deprovisionIdP created or removed a managed accountReconcile daily against HR joiners and leavers
user.suspend / user.unsuspendAccount suspended or reinstatedUnsuspend without a matching IdP change is a high-severity alert
external_identity.scim_api_failureProvisioning call failedInvestigate; failed calls leave access out of step with the IdP
team.remove_member / org.remove_memberAccess removed through group sync or deprovisioningConfirm leavers lose access within your target time
Sign-ins by the setup userUse of the only non-IdP ownerAlert on every use and require a change ticket

Stolen IdP sessions or tokens are the likely route into a managed enterprise (MITRE ATT&CK T1078.004, Cloud Accounts), followed by bulk collection from code repositories (T1213.003). See the GitHub Audit Log Detection Guide for event names and queries.

Metrics

  • Leaver latency: time from IdP disable to user.suspend in the audit log.
  • Provisioning health: SCIM failures per week and unresolved 409 or 400 errors.
  • Token posture: share of active tokens that are fine-grained and within the lifetime policy.
  • Stream health: hours of audit stream downtime per quarter.

Framework mapping

Control areaNIST SP 800-53 Rev 5NIST CSF 2.0
IdP-driven account lifecycle and group-based accessAC-2 Account ManagementPR.AA-01
SSO through the IdP, setup user 2FAIA-2PR.AA-01
Token lifetimes and approval, SCIM token handlingIA-5 Authenticator ManagementPR.AA-01
Team mapping, owner minimisationAC-6 Least PrivilegePR.AA-05
Audit log streaming and reviewAU-2, AU-6DE.CM-03

Common failure patterns

  • Choosing the enterprise type late: building organisations under personal accounts and then needing a new enterprise to adopt EMU.
  • Untested userName mapping: email local parts that collide across domains, producing 409 errors for whoever is provisioned second.
  • A neglected setup user: the one owner outside the IdP, with recovery codes and a never-expiring SCIM token, left in a personal password manager or with a departed engineer.
  • Hard deprovisioning by accident: IdP connectors set to delete rather than disable, destroying tokens, keys and user-owned repositories that cannot be restored.
  • Turning on Conditional Access without testing apps and Actions: user-to-server app calls and token-based workflows fail on IP conditions in production.

Practitioner checklist

  • Record the decision to use EMU, the shortcode and the open source contribution policy before creating organisations.
  • Use one partner IdP for both authentication and SCIM, with OIDC on Entra ID where Conditional Access is wanted.
  • Vault the setup user password, 2FA and recovery codes, and alert on every setup user sign-in.
  • Give the SCIM token a named owner, a vault entry and a rotation procedure.
  • Test the userName mapping against the full directory for collisions and length before provisioning.
  • Configure IdP removal as disable or deactivate, never delete, and test deprovisioning and reinstatement in the pilot.
  • Restrict classic personal access tokens, set maximum lifetimes and require approval for fine-grained tokens in sensitive organisations.
  • Stream the audit log with Git and API request events to your SIEM and act on health check emails within six days.

Standards and references

Related NHI Mgmt Group resources: GitHub and GitHub Actions Security Guide · GitHub Enterprise Server Security · SCIM Provisioning Guide · SaaS Security Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.