The Complete Guide to Migrating to GitHub Enterprise Managed Users - Part 3: Identity & Access Setup #189384
jmassardo
started this conversation in
Discover: GitHub Best Practices
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The Complete Guide to Migrating to GitHub Enterprise Managed Users - Part 3: Identity & Access Setup
Phase 3: Identity & Access Setup
Setting up the new environment before migration.
Before you can migrate repositories, you need users to assign permissions to. This phase covers configuring your IdP integration, provisioning users via SCIM, and setting up team structures. Get this right first - it makes everything else smoother.
Identity and User Lifecycle Management
This is where EMU really shines, but also where things can go sideways if not configured properly.
Username Normalization
GitHub automatically creates usernames by normalizing an identifier from your IdP. The format is:
For example, if your enterprise shortcode is
acmeand the IdP providesJohn.Smith@company.com, the username might becomejohn-smith_acme.Be aware that:
rand()your usernames will change and your users will have a bad time...See Username considerations for external authentication for normalization rules.
SCIM Provisioning Lifecycle
With SCIM properly configured, the user lifecycle is fully automated:
stateDiagram-v2 [*] --> Assigned: User assigned to GitHub app in IdP Assigned --> Provisioned: SCIM creates account on GitHub Provisioned --> Active: User authenticates via IdP Active --> Updated: IdP attribute changes Updated --> Active: SCIM syncs changes Active --> Suspended: User unassigned from app Suspended --> Reactivated: User re-assigned to app Suspended --> [*]: Account cleaned up Reactivated --> Active: Username restored classDef stateStyle fill:#b3e5fc,stroke:#0288d1,color:#333 class Assigned,Provisioned,Active,Updated,Suspended,Reactivated stateStyleTeam and Permission Synchronization
In EMU, team membership is managed through your IdP using group synchronization. This is a fundamental shift from standard GHEC where team membership is managed directly in GitHub.
How Team Sync Works
flowchart LR subgraph IdP["Identity Provider"] IG1["Engineering Group"] IG2["Platform Group"] IG3["Security Group"] end subgraph GitHub["GitHub EMU Enterprise"] GT1["engineering-team"] GT2["platform-team"] GT3["security-team"] end IG1 -->|"syncs to"| GT1 IG2 -->|"syncs to"| GT2 IG3 -->|"syncs to"| GT3 style IdP fill:#e3f2fd,stroke:#1976d2,color:#333 style GitHub fill:#e8f5e9,stroke:#388e3c,color:#333 style IG1 fill:#bbdefb,stroke:#1565c0,color:#333 style IG2 fill:#bbdefb,stroke:#1565c0,color:#333 style IG3 fill:#bbdefb,stroke:#1565c0,color:#333 style GT1 fill:#a5d6a7,stroke:#2e7d32,color:#333 style GT2 fill:#a5d6a7,stroke:#2e7d32,color:#333 style GT3 fill:#a5d6a7,stroke:#2e7d32,color:#333When you connect an IdP group to a GitHub team:
Setting Up Team Sync
Step 1: Create the GitHub team
Step 2: Connect the IdP group
In the GitHub UI:
Or via API:
Team Structure Planning
Before migration, map out how your IdP groups will connect to GitHub teams:
eng-backendbackend-developersapi-services/*eng-frontendfrontend-developersweb-app/*eng-platformplatform-teaminfrastructure/*eng-leadstech-leadssecurity-teamsecurity-reviewersKey considerations:
One-to-one or one-to-many? Each GitHub team can only be connected to ONE IdP group. But one IdP group can be connected to multiple GitHub teams if needed.
Nested teams: GitHub supports nested teams, but the IdP group connection only applies to the team it's directly connected to. Child teams don't inherit the group connection.
Naming conventions: Establish clear naming conventions that work in both systems. Consider prefixes like
gh-in your IdP to identify GitHub-related groups.Permission inheritance: Teams grant repository permissions. Plan your team hierarchy to match your access control needs.
Common Pitfalls
❌ Problem: Manually adding users to synced teams
Users added manually to a team with IdP sync enabled will be removed on the next sync cycle. All membership must flow through the IdP group.
❌ Problem: Orphaned teams after migration
If you migrate teams but don't connect them to IdP groups, they'll have no members (since EMU users can only be in teams via IdP sync).
❌ Problem: Too many small groups
Creating a 1:1 mapping between every repository and an IdP group leads to group sprawl in your IdP. Use team hierarchies and broader access patterns where appropriate.
✅ Solution: Plan your group strategy
Verifying Team Sync
After setup, verify sync is working:
See Managing team memberships with identity provider groups for complete documentation.
Beta Was this translation helpful? Give feedback.
All reactions