You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5aed0a9
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: en/on-call/integration/sso/role-team-sync.mdx
+20-9Lines changed: 20 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,22 @@
1
1
---
2
2
title: "Role and Team Sync"
3
-
description: "For SAML2.0, OIDC, and CAS, member roles and teams are synced by exactly matching the role/team names returned by the identity provider (claim/attribute names); default roles/teams apply when no name matches"
3
+
description: "SAML2.0, OIDC, and CAS sync roles and teams by name on every sign-in; without matches, defaults apply only to newly created members and existing members keep their assignments"
In the **Platform Management → Single Sign-On** settings page, the **Sync Configuration** section decides how members get their Flashduty roles and teams when they sign in via SSO:
8
8
9
-
-**SAML2.0 / OIDC / CAS**: matching by the **role names / team names** returned by the identity provider (claim / attribute names); when no name matches, the configured **default roles / default teams** apply.
9
+
-**SAML2.0 / OIDC / CAS**: matching by the **role names / team names** returned by the identity provider (claim / attribute names). When no name matches, **default roles / default teams** apply only to members actually created during this sign-in; existing members keep their assignments.
10
10
-**LDAP**: does not use name matching; instead it matches the user's **LDAP Group** DN against mapping rules. See [LDAP Role and Team Synchronization](/en/platform/configure-sso#ldap-role-and-team-synchronization).
11
11
12
12
Sync runs on **every SSO sign-in**. This page describes the sync configuration and matching rules for SAML2.0 / OIDC / CAS.
13
13
14
+
<Warning>
15
+
**In most cases, leave default roles and default teams empty to keep fallback assignments off.**
16
+
17
+
Defaults apply only to members actually created during this sign-in without matches for the corresponding names, not to existing members. They are still shared rules for the whole SSO configuration: every new member meeting these conditions receives the same default roles or joins the same default teams. Do not configure general administrator privileges or sensitive teams just to make a sign-in test work.
18
+
</Warning>
19
+
14
20
## Sync Configuration Fields
15
21
16
22
The **Sync Configuration** section contains the following fields:
@@ -21,13 +27,15 @@ The **Sync Configuration** section contains the following fields:
21
27
| Sync Teams (`sync_team_enabled`) | Switch. When on, teams are synced by name; when off, sign-in never changes a member's teams |
22
28
| Role Field (`roles`) | The name of the claim / attribute that carries the **role names** returned by the identity provider, e.g. `roles`. Accepts a string or an array of strings; names are matched exactly |
23
29
| Team Field (`teams`) | The name of the claim / attribute that carries the **team names** returned by the identity provider, e.g. `teams`. Accepts a string or an array of strings; names are matched exactly |
24
-
| Default Roles (`default_role_ids`) | Multi-select of roles (the dropdown lists enabled roles only). Applied when none of the returned role names matches an eligible role |
25
-
| Default Teams (`default_team_ids`) | Multi-select of teams. Applied when none of the returned team names matches a team |
30
+
| Default Roles (`default_role_ids`) | Multi-select of roles (the dropdown lists enabled roles only). With role sync enabled and no names matching an eligible role, defaults apply **only to members created during this sign-in**. Existing members are unaffected. **Usually leave empty**|
31
+
| Default Teams (`default_team_ids`) | Multi-select of teams. With team sync enabled and no names matching an eligible team, defaults apply **only to members created during this sign-in**. Existing members are unaffected. **Usually leave empty**|
26
32
27
33
<Note>
28
-
If the **Role Field / Team Field is left empty**, no name ever matches: when the corresponding sync switch is on, that dimension falls straight into the default roles / default teams branch at sign-in. With no eligible defaults configured, the result is empty (see [When Sync Takes Effect and Overwrite Semantics](#when-sync-takes-effect-and-overwrite-semantics)).
34
+
If the **Role Field / Team Field is left empty**, no name matches. With the corresponding sync switch on, only newly created members can receive eligible defaults for that dimension; existing members keep their assignments. Without eligible defaults, that dimension is not synced and existing roles or teams are not cleared (see [When Sync Takes Effect and Overwrite Semantics](#when-sync-takes-effect-and-overwrite-semantics)).
29
35
</Note>
30
36
37
+
Defaults have no separate toggle: clear the corresponding selection to turn fallback assignments off. To stop SSO from managing roles or teams, disable the corresponding sync option; clearing defaults alone does not prevent valid mappings from replacing existing assignments on every sign-in.
38
+
31
39
## Matching Rules
32
40
33
41
Role/team name matching happens on the Flashduty server, with these rules:
@@ -53,7 +61,7 @@ Role/team name matching happens on the Flashduty server, with these rules:
53
61
54
62
### Default roles / default teams fallback
55
63
56
-
-Defaults apply only when the dimension's resolution result is **empty** (no name matched at all); roles and teams fall back **independently** of each other.
64
+
-Eligible defaults apply only when this sign-in **actually creates a new member** and no name matches for that dimension. Roles and teams fall back **independently** of each other. Existing members do not receive defaults on sign-in.
57
65
- Default roles: the preset roles (`Admin` / `Responder` / `Viewer`) are always eligible; a custom default role must **exist and be enabled**, otherwise it is skipped with a warning logged.
58
66
- Default teams: must **exist and not be deleted**, otherwise they are skipped.
59
67
- The resolved role IDs / team IDs are deduplicated and sorted in ascending order.
@@ -76,11 +84,14 @@ When saving the SSO configuration, the console discards sync fields that do not
76
84
77
85
## When Sync Takes Effect and Overwrite Semantics
78
86
79
-
- Sync runs on **every SSO sign-in**: the server resolves role IDs and team IDs from the claim names first, then writes them to the member.
80
-
- The write is **overwrite mode**: the resolved result at sign-in becomes the member's final roles/teams; it is not merged with existing roles/teams.
81
-
- If sync is on but the resolution result is empty (no name matched and no eligible default role/team), the member's roles or teams in that dimension are **cleared**.
87
+
- With sync enabled and matching names, valid mappings update the corresponding roles or teams on **every SSO sign-in**.
88
+
- Valid mappings **replace assignments rather than append to them**, including manually assigned roles or team memberships; they are not merged with existing assignments.
89
+
- Without matching names, eligible defaults apply only to members actually created during this sign-in; existing members keep their corresponding roles or teams.
90
+
- Without matching names or eligible defaults, that dimension is not synced: new members follow the existing creation flow, and existing members' roles or teams are not cleared.
82
91
- When both sync switches are off, sign-in never changes a member's roles or teams.
83
92
93
+
**A first SSO sign-in does not necessarily create a new member.** Members already created or invited by an administrator, and existing members linked to a stable user ID for the first time, do not receive defaults. Defaults apply only when Just-In-Time (JIT) provisioning creates a new member record during this sign-in. Changing defaults does not reassign existing members' roles or teams.
Copy file name to clipboardExpand all lines: en/platform/configure-sso.mdx
+87-2Lines changed: 87 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,8 @@ The egress IPs above apply only to Flashduty's **SaaS (public cloud) service**.
43
43
| SSO-only login (`force_sso`) | Enabled by default. When on, every member of this account can sign in only via SSO; password and verification-code sign-in are rejected. See [SSO-only login](#sso-only-login) below |
44
44
| Flashduty Service Provider Info |**Service Provider Metadata** and **Assertion Consumer Service URL** (assertion address for identity provider to call for single sign-on) |
45
45
46
+
You can sync roles and teams by the names returned by your identity provider. See [Role and team mapping](#role-and-team-mapping). **Leave default roles and default teams empty in most cases to keep fallback assignments off.**
47
+
46
48
## Configuring OIDC Protocol
47
49
48
50
---
@@ -62,6 +64,8 @@ The egress IPs above apply only to Flashduty's **SaaS (public cloud) service**.
62
64
| Scopes | Specifies the information and functionality permissions the request can access, with support for customization. Defaults to `openid`, `profile`, `email`, `phone`; you can add custom scopes as tags |
63
65
| Flashduty Service Provider Info |**Redirect URL**: Identity provider callback address<br />**Supported Signing Algorithms**: RS256, RS384, RS512, ES256, ES384, ES512, PS256, PS384, PS512 (HS256 not supported) |
64
66
67
+
You can sync roles and teams by the names returned by your identity provider. See [Role and team mapping](#role-and-team-mapping). **Leave default roles and default teams empty in most cases to keep fallback assignments off.**
68
+
65
69
<Warning>
66
70
Scopes is a required field. The default values `openid`, `profile`, `email`, `phone` are the base permissions needed for OIDC to function properly. Removing these defaults may cause single sign-on to fail or prevent correct retrieval of user information. If you need to add custom scopes, add them while keeping the defaults intact.
67
71
</Warning>
@@ -84,8 +88,89 @@ Scopes is a required field. The default values `openid`, `profile`, `email`, `ph
84
88
| SSO-only login (`force_sso`) | Enabled by default. When on, every member of this account can sign in only via SSO; password and verification-code sign-in are rejected. See [SSO-only login](#sso-only-login) below |
85
89
| Flashduty Service Provider Info |**Redirect URL**: Identity provider callback address |
86
90
91
+
You can sync roles and teams by the names returned by your identity provider. See [Role and team mapping](#role-and-team-mapping). **Leave default roles and default teams empty in most cases to keep fallback assignments off.**
92
+
93
+
## Role and team mapping
94
+
95
+
OIDC, SAML2.0, and CAS support syncing member roles and team membership by the **role names and team names** returned by your identity provider. LDAP continues to use [Group DN mapping](#ldap-role-and-team-synchronization), not the name mapping described here.
96
+
97
+
**Field mappings apply on every sign-in; defaults apply only when creating members.** After you enable the corresponding sync option and configure the role or team field, valid matches replace the member's existing roles or team memberships on every SSO sign-in, including manually assigned ones. With no matches, existing members keep their assignments; only members actually created during this sign-in receive the configured valid defaults. Roles and teams are handled independently.
98
+
99
+
<Warning>
100
+
**In most cases, keep default role and default team fallbacks off by leaving both selections empty.**
101
+
102
+
Defaults apply **only when the current SSO sign-in actually creates a new member and no names match for the corresponding roles or teams**. Existing members do not receive defaults on sign-in, and changing defaults does not reassign their permissions.
103
+
104
+
Defaults are still shared rules for this SSO configuration, not settings for an individual member. If a mapping field is empty or incorrect, or the identity provider returns no matching names, **every new member created through this SSO configuration without matches receives the same default roles or joins the same default teams**. Do not select defaults just to make a sign-in test work. In particular, do not use administrator or other privileged roles, or sensitive teams, as general defaults.
105
+
</Warning>
106
+
107
+
### Configuration fields
108
+
109
+
**Configuration path**: Platform Management → Single Sign-On → Select OIDC, SAML2.0, or CAS → Sync Configuration
110
+
111
+
| Field | Configuration |
112
+
| --- | --- |
113
+
| Sync roles (`sync_role_enabled`) | When enabled, updates roles from valid mapping results on every SSO sign-in. Without matches, only new members can receive default roles. When disabled, role sync does not run |
114
+
| Role field (`roles`) | The field containing role names, such as `roles`, not a role name or ID. With role sync enabled, matches replace existing roles on **every sign-in**, including manually assigned roles |
115
+
| Default roles (`default_role_ids`) | Supports multiple selections. With role sync enabled and no returned role names matching an available role, **only members created during this sign-in** receive these default roles. Existing members are unaffected. **Usually leave empty**|
116
+
| Sync teams (`sync_team_enabled`) | When enabled, updates team membership from valid mapping results on every SSO sign-in. Without matches, only new members can receive default teams. When disabled, team sync does not run |
117
+
| Team field (`teams`) | The field containing team names, such as `teams`, not a team name or ID. With team sync enabled, matches replace existing team memberships on **every sign-in**, including manually added memberships |
118
+
| Default teams (`default_team_ids`) | Supports multiple selections. With team sync enabled and no returned team names matching an available team, **only members created during this sign-in** receive these default teams. Existing members are unaffected. **Usually leave empty**|
119
+
120
+
Defaults have no separate toggle: to turn fallback assignments off, clear the default role and default team selections. If you do not want SSO to manage roles or teams, turn off **Sync roles** or **Sync teams**, respectively.
121
+
122
+
### How names match
123
+
124
+
- Mapping field names are strings. The returned values can be a single string or an array of strings. Use an array for multiple names: `"A,B"` is treated as one complete name and is not split on commas.
125
+
- Flashduty trims leading and trailing whitespace, matches names exactly and case-sensitively, and removes duplicate names.
126
+
- Roles match the preset names `Admin`, `Responder`, and `Viewer`, or enabled custom roles in the current account. Teams match non-deleted teams in the current account.
127
+
- If multiple eligible roles or teams share a name, Flashduty selects the one with the **smallest ID**. Name mapping does not create roles or teams.
128
+
- OIDC reads the returned claims, SAML reads assertion attributes, and CAS reads returned user attributes. Field names must match what your identity provider actually returns.
129
+
130
+
For example, if OIDC returns these claims, enter `roles` as the role field and `teams` as the team field:
131
+
132
+
```json
133
+
{
134
+
"roles": ["Responder"],
135
+
"teams": ["Platform", "Database"]
136
+
}
137
+
```
138
+
139
+
Create the example teams in Flashduty first, and replace the returned values with the names you use. **This mapping example requires no default roles or teams.**
140
+
141
+
### When defaults apply
142
+
143
+
Roles and teams **match and fall back independently**. For example, if roles match but teams do not, Flashduty uses the matched roles. A new member can receive default teams; an existing member keeps their current teams.
144
+
145
+
**A first SSO sign-in does not necessarily create a new member.** Members already created or invited by an administrator, and existing members linked to a stable user ID for the first time, do not receive defaults. Defaults apply only when Just-In-Time (JIT) provisioning creates a new member record during the current sign-in.
146
+
147
+
| Corresponding sync option | Name matching result | Behavior on sign-in |
148
+
| --- | --- | --- |
149
+
| Off | Any | Does not run this sync; neither mappings nor defaults apply |
150
+
| On | At least one match | Uses the matches without adding defaults; ignores unmatched names |
151
+
| On | No matches, with valid defaults | New members receive the corresponding defaults; existing members keep their assignments |
152
+
| On | No matches and no valid defaults | Does not run this sync: new members follow the existing creation flow; existing members keep their roles or teams |
153
+
154
+
<Warning>
155
+
**Valid mappings replace assignments; they do not append to them.** On an existing member's next SSO sign-in, valid mapping results can still replace manually assigned roles or teams. A dimension with no matches remains unchanged. To manage roles or teams entirely by hand, disable the corresponding sync option instead of only clearing its defaults.
156
+
</Warning>
157
+
158
+
### Recommended setup order
159
+
160
+
<Steps>
161
+
<Steptitle="Configure name mapping and leave defaults empty">
162
+
Confirm that your identity provider returns the correct role and team names for each group of members, then enable the sync options you need. Keep an option off until its mapping is ready.
163
+
</Step>
164
+
<Steptitle="Test members with and without matches">
165
+
Use test members to check matching names, missing fields, and unmatched names. Sign in again to confirm the actual role and team changes. Test existing members as well as new members.
166
+
</Step>
167
+
<Steptitle="Configure defaults only for an intentional shared fallback">
168
+
Select default roles or teams only when every new member created through SSO without matches should receive the same minimum required permissions or join the same teams. **Otherwise, leave defaults empty to keep fallback assignments off.** Changing defaults does not affect existing members.
169
+
</Step>
170
+
</Steps>
171
+
87
172
<Note>
88
-
**Role and team sync**: For SAML2.0 / OIDC / CAS, the **Sync Configuration** section of the settings page syncs roles/teams by the **role/team names** returned by the identity provider (claim / attribute names) — names are matched exactly (case-sensitive), and when no name matches, the configured **default roles / default teams** apply. LDAP instead uses Group DN mapping rules; the two mechanisms differ. See [Role and Team Sync](/en/on-call/integration/sso/role-team-sync) for the matching rules, per-protocol name sources, and when sync takes effect.
173
+
See [Role and Team Sync](/en/on-call/integration/sso/role-team-sync) for per-protocol name sources, matching rules, and field retention. LDAP uses Group DN mapping, not the name mapping or new-member default rules in this section.
89
174
</Note>
90
175
91
176
## Configuring LDAP Protocol
@@ -252,7 +337,7 @@ Before modifying, ensure you have checked your email integration configuration a
252
337
253
338
<CardGroupcols={4}>
254
339
<Cardtitle="Role and Team Sync"icon="users"href="/en/on-call/integration/sso/role-team-sync">
255
-
SAML2.0/OIDC/CAS sync roles and teams by name, with default config fallback
340
+
SAML2.0/OIDC/CAS sync by name on every sign-in; defaults apply only to new members without matches
0 commit comments