How n8n SSO role provisioning keeps access aligned with your directory
SSO role provisioning lets n8n assign instance roles and project roles from identity provider groups at sign-in, so a person's access follows their directory membership instead of a manual edit in the n8n interface. Teams usually need it when a shared instance has grown beyond a handful of administrators, when people move between teams and keep old permissions, when auditors ask who can edit production workflows and credentials, or when a leaver's account stays active because nobody remembered to change it. Role mapping is a layer on top of sign-in, not a replacement for it. It works only once SAML or OIDC login to n8n is functioning, so the identity provider application, redirect or reply URLs and user attributes must be verified first, as covered in the sign-in sections of this page.
Before enabling anything, decide which provisioning mode fits your model. n8n's documentation describes three settings: disabled, instance_role (which maps groups to instance-level roles only) and instance_and_project_roles (which also maps groups to project roles). Confirm the exact setting names and the mapping rule syntax against the current n8n documentation for your version, because role mapping details change between releases. Also agree on which group names are authoritative, who owns them in the directory, and what happens to a user who belongs to no mapped group. Record the expected outcome for each group in a table before the first test, so the reviewer can check results against intent rather than against whatever the instance happens to show.
Test the mapping in a non-production instance with test accounts in each group, including a user in several groups and a user in none. Check the role shown in the n8n interface after first sign-in and again after a group change, then confirm that removing a user from a group takes effect at the next sign-in as the documentation describes. Plan for the gaps this leaves open: a session that is already active, a local owner account that sits outside SSO, and offboarding steps that must still delete or transfer the person's workflows and credentials. Keep a written rollback path, and retest after each n8n upgrade, since role behavior is part of what a version change can affect.
Which provisioning mode fits your team structure
This table compares the three role provisioning modes and what each one assigns from identity provider groups. Read each row against the team structure you already have, then confirm the exact behavior in the n8n documentation for the version you run before you choose a mode. The main takeaway is that your choice depends on whether project access should follow IdP groups or stay managed inside n8n.
| Mode | What n8n assigns from groups | When it fits |
|---|---|---|
| disabled | Nothing. Roles stay managed inside n8n by an owner or admin. | Small teams, or instances where admins prefer manual role assignment while the group mapping is still being designed. |
| instance_role | Instance-level roles only, based on your mapping rules. Confirm in the docs for your version that project roles are not set from groups in this mode. | Organizations that need group-driven instance roles but manage project sharing by hand inside n8n. |
| instance_and_project_roles | Instance roles and project roles, based on mapping rules. Confirm the exact project mapping syntax and behavior for your version. | Organizations whose IdP groups already match team and project boundaries and who want project access to follow group changes. |
| Overlapping groups | A user may match several rules. Confirm how your version resolves conflicting or duplicate role assignments. | Any mode. Test overlap with a non-admin test account before enabling the mapping for all users. |
| Plan requirement | SSO is included only on the Business and Enterprise plans, according to n8n's pricing page. | Confirm your plan before designing the mapping, since the modes depend on SSO being available. |
| Local owner account | Not managed by group mapping in any mode. Keep it outside SSO so administrators can recover access. | All modes. Decide who holds the local owner credentials before you change the provisioning mode. |
How a group claim becomes an n8n role at sign-in
The path starts when a user signs in through the identity provider, which sends group claims in the SAML assertion. n8n then checks those claims against the mapping rules in the order they are listed. The first matching rule sets the instance role and any project roles, and the provisioning mode decides whether project roles are assigned at all. A user who matches no rule needs a defined outcome, so check that path during testing before you enforce SSO for everyone.
Sign-in path from identity provider group claims to n8n roles, with the provisioning mode branch.
Writing role mapping rules that stay correct as groups change
A role mapping rule set is only as good as the groups it reads and the order it evaluates them in. The cards below cover the design decisions that determine whether n8n roles still match intent after your directory changes, and what to confirm in the n8n docs before you build.
The group claim each rule reads
Every rule starts with a claim from the identity provider, usually a list of group names or identifiers sent in the SAML assertion or OIDC token. Decide whether the rule matches on display names or on stable object IDs. Display names are easy to read but change when someone renames a group, which silently breaks the rule. Object IDs survive renames but are harder to review. Confirm which claim your provider sends by default, whether it can be configured to send IDs, and whether it has a size limit for users with many group memberships.
n8n SAML docsThe instance role each rule assigns
Instance roles control what a user can do across the whole n8n instance, so a mapping error here has the widest blast radius. Keep the number of groups that grant instance-level access small and named for their purpose. Before you rely on any mapping, confirm which instance roles your edition offers through SSO and which of them can be granted automatically. Test each instance-level grant with a non-administrative account first.
The project and role each rule assigns
Project assignments decide which workflows and credentials a user can reach. The main trade-off is between broad groups, such as one group per department mapped to a shared project, and narrow groups, such as one group per project with a role suffix. Broad groups need fewer directory objects but give more people access than intended. Narrow groups are easier to audit but multiply as teams and projects grow. Confirm whether your mode maps projects at all and how a user in several groups is resolved.
Rule ordering and precedence
When a user matches several rules, the outcome depends on which rule is evaluated first and whether a later match can raise or lower an earlier grant. Write rules so the most restrictive or most sensitive outcomes are unambiguous, and avoid overlapping rules that grant the same role through different paths. Document the evaluation order next to the rule set, and confirm in the docs whether all matching rules apply, or only the first match, before you write any rule.
Default for users with no matching group
A user who signs in without any mapped group needs a defined outcome. Some teams want the account created with no access, which makes the default safe but means someone must follow up. Others want a basic viewer role, which is convenient but grants visibility to anyone with a valid login. Confirm what n8n does for an authenticated user with no matching group, whether the account is created at all, and whether that default is applied on every sign-in or only at first login.
Naming conventions for directory groups
Consistent group names make rules easier to review and keep mappings correct over time. Use a prefix that identifies the application, then the scope, then the role, for example a naming pattern built from application, project and role segments. Agree the pattern with the directory team, record it in the rule set, and block ad hoc groups from being mapped to n8n. Review group membership on a schedule, since stale members and renamed groups are the most common reasons role provisioning drifts from intent.
Testing group mappings before rollout
This sequence checks that IdP groups map to the right n8n instance and project roles before any production user is affected. Each step ends with a result you can verify, so the rollout starts only after the test matrix matches the intended access.
Create a test group set in the identity provider
An identity administrator creates a small set of test groups in the identity provider, one for each role the mapping must produce, plus a second group for the overlap test. Add a dedicated test account to each group. Confirm the staging n8n instance uses the same identity provider configuration as production, including the same application or client settings and the same group claim or attribute, so results carry over. The step is complete when each test account shows the expected group membership in the identity provider console and the group values appear in a test sign-in assertion or token.
Build the mapping on the staging instance
On the non-production n8n instance, confirm the plan includes SSO, since the pricing page lists SSO only in the Business and Enterprise plans. Choose the provisioning mode that matches your design: disabled, instance_role, or instance_and_project_roles. Enter one mapping rule per identity provider group, assigning the instance role and, where the mode supports it, the project role. Save the rules and record them in a table that lists group, instance role and project role. The step is complete when the settings screen shows the chosen mode and every rule is saved.
Sign in with test accounts for each role
A tester signs in to staging through SSO once with each test account, using a separate private browser window for each so sessions do not carry over. Confirm that sign-in completes and that the account reaches the instance without errors from the identity provider. Note any account that fails to sign in or lands on an unexpected screen. The step is complete when every test account has signed in once and the sign-in outcome is recorded next to its group membership.
Confirm assigned instance and project roles
The tester compares the role each test account received in the n8n user list and project membership views against the mapping table from the second step. Each row should show the group, the expected instance role, the expected project role and the actual values. Investigate any mismatch, correct the rule on staging, and repeat the sign-in for that account before moving on. The step is complete when every row in the matrix matches and no account holds access beyond its intended role.
Test a removed user and a user in two groups
Remove one test account from its group in the identity provider, then sign in again and check whether the n8n role changes as the mapping expects. Record that existing sessions may stay active until they end, since removing a user in the identity provider does not automatically end n8n sessions. Next, add a second test account to two groups whose rules overlap or conflict, and observe which role n8n assigns. The step is complete when both results match what the team wrote down before testing, and any surprise is resolved in the rules before continuing.
Verify the break-glass owner account
Sign in with the local owner account that bypasses SSO, using the login path your configuration allows, while SSO and the mapping remain enabled on staging. Open the admin settings and confirm the account can still manage users and identity settings. Confirm the credentials are stored where only authorized administrators can reach them. The step is complete when the owner account signs in successfully, opens admin settings and is listed in the test matrix as the recovery path.
Enable the mapping for production users
Only after every earlier step passes, apply the same mode and mapping rules to the production instance, using the same identity provider configuration that staging used. Assign an administrator to watch the first production sign-ins and compare a sample of accounts against the test matrix. Record the change in your change log with the date, the approver and the rule set version. The step is complete when the sampled production accounts show the same roles as their staging counterparts and the change record is saved.
Security risks when directory groups decide who is an admin
When an identity provider group decides an n8n role, every membership change in the directory becomes an access change in n8n. The cards below cover where that link breaks down and the controls teams usually put around it, since n8n does not enforce these controls on its own.
Broad groups granting admin
A group with a generic name, such as one that every engineer joined for email or VPN access, can quietly map to the instance admin role. Anyone who can add themselves to that group, or who inherits it through nesting, then gets full control of the instance. Before go-live, list every group in the mapping rules, confirm its owner, and check its membership against the people who should hold admin rights. Assign group ownership in your directory so that a named person approves each change to an admin-mapped group.
Roles that outlive group membership
Whether a role is removed when a user leaves a mapped group depends on the provisioning mode you choose. Test this directly: remove a test account from a group, sign it in again, and confirm the role it held is gone. Where the mode leaves old roles in place, schedule a recurring review that compares n8n role assignments with current directory membership, and record who ran it and what was changed.
Directory changes missed in n8n
Teams often change group membership, rename a group or move a claim in the identity provider without telling the people who run n8n. The effect appears only when a user next signs in, so the change can go unnoticed for a long time. Require that changes to groups referenced by n8n go through a review that includes the n8n owner, and run a periodic comparison of the directory group list against the mapping rules to catch renamed or deleted groups.
Sign-in paths that skip the mapping
If local email and password accounts, the break-glass owner or an alternative sign-in method remain enabled, some users can reach n8n without the group mapping ever running. Their roles then come from manual settings rather than the directory. Inventory every way a user can sign in to your instance, decide which are allowed, and test each one with an account that should have limited access. Keep the number of exempt accounts small and documented.
Unrecorded mapping changes
Edits to role mapping rules, such as adding a group to an admin role or changing which project a group receives, change who can reach production workflows and credentials. If those edits are made directly in the settings without a record, nobody can later explain why a user had access. Keep the mapping rules in a version-controlled file or change ticket, require a second person to approve each change, and test the new rules with test accounts before enabling them for real users.
How role changes apply to existing users and active sessions
Changing a role mapping can change the access of people who already have an n8n account, so decide in advance how existing roles are treated before you enable any mode. Confirm with the n8n SSO documentation and in a test instance whether roles are reassigned only when a user is first provisioned or again at each sign-in, and whether a user's local role is overwritten or kept when a mapping no longer matches. Write down the answer for each case you expect in production, including a user who loses every mapped group, a user whose group moves them from one project to another, and a local owner account that no directory group covers. Those are the cases that produce surprise access changes or lockouts, and they are much cheaper to settle in a test instance than after a rollout.
Removing a user from a directory group does not by itself end an active n8n session. A session that was already open stays valid until it expires or is ended in n8n, so a change in the identity provider may not take effect for someone who is still signed in. Treat group changes and session termination as two separate tasks, and treat deprovisioning a leaver as the offboarding procedure rather than as a side effect of editing a group. Ask your team to confirm how long n8n keeps a session alive and whether a role change applies to a session that is already open, and do not put any timing figure into a runbook or a customer answer until you have observed it in your own test instance.
Before the first production sign-in, run a short test: create a user in each mapped group, sign in, change the group membership, sign in again, and record which role the user holds and whether the old session still works. Repeat the test with a user who already exists locally so you see how the existing role is handled. Keep the results with the mapping configuration so that auditors and the security team can see what was tested. If the test shows that changes wait for the next sign-in, your change process must account for that delay, and your offboarding procedure should not rely on group removal alone.
Limits to confirm for your n8n version and plan
Role provisioning depends on which n8n edition, plan and version you run, and on what your identity provider actually sends. Confirm each item below in your own test environment, and with n8n for anything the public documentation does not settle, before you design the mapping.
Plan that includes role provisioning
The supplied pricing information places SAML single sign-on on the Business and Enterprise plans, but it does not confirm that group-based role provisioning falls under the same plan. Treat the two as separate questions. Ask n8n in writing whether the provisioning modes you intend to use are included in the plan you will buy, and whether the self-hosted Business plan, which is currently self-hosted only, covers them. Record the answer against the quote so the scope does not change later.
n8n pricingMode available in your edition
Confirm that the provisioning mode you plan to use, whether disabled, instance_role or instance_and_project_roles, is available in the self-hosted edition and version you run. Do not assume a mode documented for one release is present in another. Check the mode in a non-production instance on the exact version you will deploy, and confirm it is not restricted to a plan you do not hold.
Group claim format from your provider
Your identity provider decides how group membership appears in the assertion or token. Some send group names, others send object IDs, and some send groups only when a specific setting is enabled or when a user belongs to fewer groups than a threshold. Capture a real assertion from a test user and confirm the attribute name, value format and case before writing any mapping rule. A rule built from display names will silently fail if the provider sends identifiers.
Group count in the assertion
Ask how many groups your provider places in one assertion or token and whether it truncates or replaces the list when a user is a member of many groups. Test with a user who belongs to the largest number of groups you expect to map. If the provider uses a link or overage mechanism instead of listing every group, n8n will only see what the assertion carries. Confirm the behavior with your provider's documentation and your own test results.
Multi-main high availability
If you plan several main instances for high availability, check the multi-main setup first. The supplied facts state it is restricted to Enterprise self-hosted deployments and is not available in the Community edition or n8n Cloud. Confirm with n8n how each main instance applies provisioning settings, how role changes propagate, and what happens during a failover. In queue mode, also confirm the encryption key is shared with every worker and webhook processor, because role changes do not reach them if their configuration drifts.
Queue mode docsBehavior after each upgrade
n8n uses semantic versioning and ships minor releases roughly weekly, so provisioning behavior can change between versions. Before each upgrade, rerun your test users through login and confirm that their instance and project roles still match the mapping. Read the release notes for the versions between your current and target release, and keep a rollback point. Record the version you tested so you can show which behavior was verified and when.
Release notesQuestions buyers ask about SSO role provisioning
How much effort does mapping SSO groups to n8n roles take?
Effort depends mostly on how many groups and projects need a mapping and how much your identity provider already has in place. A small instance with a few groups and one or two projects is a contained configuration task. Effort grows with these factors:
- The number of identity provider groups that must map to instance roles or project roles.
- The number of n8n projects and how many distinct access levels each one needs.
- Whether group claims already reach n8n in the SAML assertion, or whether they must be built in the identity provider first.
- How much test coverage is required, including negative cases such as a user who should receive no role at all.
Group design is usually the largest unknown, because an unclear model turns into rework during testing.
What does SSO role provisioning cost and what does the quote cover?
DeployOpen does not publish a price list, so the quote follows from a written scope. Cost has two parts: the one-time build and test work, and any recurring review or retainer you choose to add. The build typically covers group design review, the mapping configuration in n8n, group attribute setup in your identity provider, staging tests and a rollout runbook. Ask for each of these as a separate line item, along with the identity providers and environments in scope, the number of groups and projects covered, the test cases included and who performs retests. The n8n license is a separate cost. According to n8n's pricing page, SSO is included only in the Business and Enterprise plans, so confirm your plan with n8n before you commit.
How long does SSO role provisioning take to set up?
Duration depends on the scope and on the identity provider, so no fixed figure applies. The schedule is set by how quickly your group design is agreed, how easily group claims can be added to the identity provider and how many rounds of staging tests are needed before rollout. A single identity provider with a small group set moves faster than a multi-directory environment with many projects. Ask for a timeline that separates design sign-off, staging build, test rounds, the production change window and post-rollout checks. Also ask which steps depend on your own change approval process, since those steps often set the calendar.
What must our team provide for role provisioning?
Your team provides the inputs and access the work cannot proceed without. Plan to provide:
- A directory group design showing which groups map to which instance and project roles, agreed by the owner of each project.
- Test accounts in the identity provider covering each intended role, plus at least one user who should receive no role.
- Administrative access to the identity provider console so group claims and application assignments can be configured and checked.
- A staging n8n instance on the same plan and edition as production, with matching SSO settings.
- Named approvers for the group design and for the production change.
Missing any of these usually delays the testing phase, which is where most of the time is spent.
Can our own team set up SSO role provisioning without a partner?
Yes, an internal team can do this alone if it has identity administration skills for your provider and enough n8n administration experience to work from the official documentation. The deciding factor is whether the team can confirm how each provisioning mode behaves before relying on it. Read the SAML setup guide for your identity provider and check the provisioning modes in the n8n documentation for your version, including disabled, instance_role and instance_and_project_roles. Confirm the behavior in staging rather than assuming it. Teams without an identity specialist, or without a staging instance, often find that testing takes the longest part of the project.
What happens to role mappings after go-live?
Mappings need ongoing review because group membership changes as teams reorganize. After go-live, someone must own changes to identity provider groups, check that new groups map to the intended roles and remove mappings for retired groups. Upgrades need retesting as well. n8n uses semantic versioning and ships minor releases roughly weekly, so run a staging test of SSO sign-in and role assignment before each production upgrade you plan. Ongoing support, upgrades and continuous testing can be covered by a retainer, priced from the agreed scope. Ask whether the retainer includes group reviews, upgrade testing and retests after identity provider changes.
Which n8n plans include SSO that role provisioning depends on?
According to n8n's pricing page, SSO and LDAP are included only in the Business and Enterprise plans, and SAML single sign-on is available on those plans. Role provisioning runs through the SSO login, so instances on the Community edition or the cloud Starter and Pro plans do not provide it. The Business plan is listed at 667 euros per month billed annually and is currently self-hosted only. Enterprise is priced on request for self-hosted or cloud use. Plan entitlements change, so confirm with n8n which plan includes the specific provisioning options you need before you sign a services agreement.
How DeployOpen scopes and delivers n8n role provisioning
DeployOpen starts by writing down which identity provider groups should map to which n8n instance and project roles, then builds and tests that mapping in your own environment before anyone relies on it. Each engagement is fixed-scope, with deliverables and timelines agreed in writing before work starts.
How we scope
- Inventory the identity provider groups and decide which ones should grant instance roles and which should grant project roles.
- Choose the provisioning mode in writing, covering disabled, instance_role and instance_and_project_roles, and record why it fits your model.
- Agree the test users, break-glass accounts and rollout criteria in the written scope before configuration begins.
How we build
- Configure the role mapping rules in a non-production n8n instance connected to a test identity provider tenant.
- Run test logins for each group combination and confirm every user lands in the expected instance and project roles.
- Document each mapping rule, its source group and any default role used when no group matches.
How we hand over
- Deliver the mapping table, configuration records and test results as written documentation for your administrators.
- Walk your identity and platform teams through the rules, the change process for group edits and the rollback steps.
- Hand over the production rollout checklist, including the verification steps to run after each change to mappings.
How we support
- Offer ongoing support and upgrades as a retainer, covering mapping reviews after n8n version changes.
- Provide retesting when identity provider groups are restructured or when new projects are added to the instance.
- Confirm with your team how role changes are reviewed, approved and logged once the mapping is in production.

