Repository navigation
Description
Summary
With Sync IdP groups to teams on, a person's SSO sign-in turns every group the identity provider reports for them into a team: missing teams are created, and the person joins each one. With Microsoft Entra ID that means every group in Microsoft Graph's /me/memberOf, up to 50 pages of 100. The only limit is a list of group names to leave out.
Reported: syncing teams took over the users' groups, so a new user's SSO sign-in synced all of them, and this should not happen. Details of the affected organization are left out of this issue.
The behaviour is what the SSO spec states (SSO-R6 to SSO-R9), so changing it changes those rules and their tests. #5138 covers the other side: teams that keep arriving while the switch is off, through SCIM.
Anchors are on main at 3d802f94f.
What the code does
- Groups are read at sign-in when the switch or a group role rule needs them and the token carried none (
callback_handler.ts:350-364). For Entra this is/me/memberOf?$select=id,displayName, every page up toGRAPH_MAX_PAGES = 50, keeping each#microsoft.graph.groupentry (entra_id/adapter.ts:190-258). Only the display names go on (callback_handler.ts:360). - Every group not excluded becomes a team.
syncTeamsFromGroupNamesfinds a team by the group's name, with case and spacing folded, or creates it. It adds the person, records that the sync made the team and the membership, and writes audit rows (sso/service.ts:276-416). - It runs on every sign-in while the switch is on (
sso/service.ts:626-641). A trusted proxy's teams header runs the same sync with no switch and no exclusions (trusted-headers.ts:270-289). - The switch is off by default (
sso/config.ts:222-237). The form calls it "Sync IdP groups to teams — Creates and updates teams from the IdP's group memberships at sign-in.", with "Exclude groups — Comma-separated group names to skip during team sync." (settings.yml:715-718); the docs say the same (enterprise-sso.md:58-71). - The spec has SSO-R6 "Team sync gives a person the teams named by their groups", SSO-R7 (takes away only what it gave), SSO-R8 (an excluded group is left alone) and SSO-R9 (audit) (
sso/spec.md:95-128). - A synced team is read-only in Tale: the identity provider owns its name and roster (
team-edit-dialog.tsx:66-69).
What follows from this:
- An exclusion list has to name every unwanted group in advance. A group that is new in the identity provider becomes a team at the next sign-in of any of its members.
- A team is matched by its display name, not its ID. A renamed group becomes a second team, and the old one goes only when its last synced member has left (SSO-R7).
- Teams are what projects and skills are shared with, so the created teams also appear wherever a team is picked.
Not examined
The affected organization's setup: the identity provider, how many groups a person has, which of them became teams, and whether SCIM is on as well (#5138). No live Entra tenant was used.
Options
None is preferred; several combine.
- A. An allow-list: sync only the groups an admin names, instead of, or beside, the exclusions.
- B. Never create a team at sign-in: join only teams that exist, or that an admin linked to a group by its ID.
- C. For Entra, read only the groups assigned to the enterprise application (the token's
groupsclaim set to "Groups assigned to the application") instead of every group from/me/memberOf. - D. Sync only some kinds of group (for example security groups, not Microsoft 365 or distribution groups).
- E. Match groups by their ID, so a rename stays the same team.
- F. A way to clean up teams the sync already created: remove them, or hand them to the admins as ordinary teams.
- G. One rule for every door: the switch and the group list apply to trusted headers and SCIM too (bug(platform): teams keep arriving from the identity provider while "Sync IdP groups to teams" is off #5138).
Questions
- Should a sign-in create teams at all, or only join teams an admin set up?
- An allow-list, or a mapping from a group to a team?
- What should happen to the teams already created in organizations that had the switch on?
- Should SCIM and the trusted-headers door follow the same rule?
Related
- bug(platform): teams keep arriving from the identity provider while "Sync IdP groups to teams" is off #5138 (open): teams keep arriving while the switch is off (SCIM).
- Teams and Roles Auto-Provisioning via Entra ID SSO #315, Epic: Enterprise SSO + SCIM end-to-end hardening (Microsoft Entra) #2116 (closed): team and role provisioning through Entra ID SSO.
- feat(platform): grant a competence to a team #5190 (closed): rights granted to a whole team.
Activity
yannickmonney commentedon Nov 14, 2026
Decision
Signing in never creates a team. The "Sync IdP groups to teams" switch and "Exclude groups" are replaced by group links. An admin links one identity-provider group, by its stable ID, to an existing Tale team. At sign-in a person joins the teams linked to the groups they hold. Each grant is recorded per link, so a membership is removed only when no linked group still grants it. Deleting a link removes the memberships it alone granted right away. A group no link names is ignored, and Tale never matches a team by its name. Sign-in never creates or deletes a team.
Answers
Why
Teams decide who sees projects and skills, and in Entra any user can create a group. Matching by name lets such a group join an admin's team. An explicit link by ID, made by an admin, closes this, and recording each grant per link makes revocation exact. Existing teams hold shares, so they are kept, and removing one stays an audited choice made by an admin.
Implementation units (base: main)
Cross-issue amendments (decisions taken together with #5138):
doormigration and the units that release teams on switch-off or exclusions, because the switch and exclusions no longer exist. Removing the SSO connection deletes nothing and releases nothing, since links stay with their teams. (b) The Teams listsourcebecomes 'scim' | 'linked' | null. 'scim' comes from a SCIM Group link. 'linked' means at least one sso_group_link exists, from either the sign-in door or the trusted-header door. Members show the IdP-granted mark from app.sso_group_link_grants. (c) Keep only bug(platform): teams keep arriving from the identity provider while "Sync IdP groups to teams" is off #5138's docs unit, reworded: SCIM group scope is set in the IdP with no Tale switch, and sign-in and trusted headers follow admin-made group links. Amend Improvement: SSO team sync should not turn every identity-provider group of a person signing in into a team #5412: change 'its own switch is decided in bug(platform): teams keep arriving from the identity provider while "Sync IdP groups to teams" is off #5138' to 'SCIM has no Tale-side group switch (bug(platform): teams keep arriving from the identity provider while "Sync IdP groups to teams" is off #5138)'. Land Improvement: SSO team sync should not turn every identity-provider group of a person signing in into a team #5412 first, then bug(platform): teams keep arriving from the identity provider while "Sync IdP groups to teams" is off #5138's reduced scope.