Single sign-on, directory sign-in and group-based access
Cognipeer reads only three things from your identity provider: who is an administrator, which role everyone else gets, and which groups a person is in. Everything else, what a group may do, which portals it may open and how much it may use, is set in Cognipeer. This page helps you choose the sign-in method, design the groups, and prove with a test that people get the access you intend.
Enterprise feature
Single sign-on (sso) and directory sign-in (ldap) are Enterprise licence modules. Without the licence the settings pages show an upgrade prompt. The field-by-field reference is in Authentication; this page is the decision and rollout guide.
When to use
- You are connecting Cognipeer to a corporate identity provider (IdP) and want people to sign in with their company account.
- You need group membership in the IdP to decide who may administer, build, or open a portal.
- You want to test the setup with real claims before anyone signs in.
Decide
Answer four questions in this order.
| Question | If yes | If no |
|---|---|---|
| Can your IdP register an OIDC application (authorization code flow, client ID and secret)? | Use single sign-on. | SAML is not supported. On a self-hosted installation use LDAP; otherwise keep local accounts, or ask your IdP team for an OIDC application. |
| Is this a self-hosted installation? | SSO or LDAP are both possible. | On the hosted service only SSO exists: the LDAP page is hidden and its API answers 404. |
| Does the IdP send a groups claim in the ID token? | Groups can follow the IdP (group sync). | Only the role mapping works (admin or not, plus one default role). Manage groups by hand in Cognipeer. |
| Must password sign-in be closed once SSO is on? | Not possible today: there is no "SSO only" switch. See What is not supported for what you can do. | Nothing to plan. |
What is not supported
| Not supported | What it means in practice |
|---|---|
| SAML | Only OIDC is implemented. |
| SCIM (automatic provisioning and deprovisioning) | People are created at their first sign-in. When someone leaves the company, Cognipeer is not told. Disable the account in Cognipeer too. |
| "SSO only" enforcement | Accounts that SSO creates get an unusable random password, so they have no password to sign in with, and their password cannot be changed in Cognipeer. An account that existed before SSO keeps the password it had, and nothing closes the password sign-in for it. Keep the workspace owner's password as the way back in if the IdP is down. |
| LDAP on the hosted service | LDAP is for self-hosted installations only. |
| More than one SSO connection per workspace | The SSO settings page holds one connection, with one default role. See Four groups, three layers for what that means for the design. |
Four groups, three layers
This is a recommended starting design, not a product feature. It works because of how the sign-in reads your IdP: the role mapping can say only "administrator or not", plus one default role for everybody else. Everything finer comes from groups.
| IdP group (example name) | Layer | What it drives in Cognipeer |
|---|---|---|
cognipeer-admins | 1. Workspace role | The admin claim marks these people as administrators. |
cognipeer-builders | 2. Group grants and projects | Mapped to a Cognipeer group that carries service permissions and project assignments. |
cognipeer-portal-<audience> | 3. Portal access | Mapped to a Cognipeer group that you add to a portal's access list. |
cognipeer-limits-<tier> (optional) | 3. Limits | Mapped to a Cognipeer group that carries usage limits. See Limits and quotas. |
IdP Cognipeer
--- ---------
cognipeer-admins -----> 1 workspace role: admin (every sign-in)
cognipeer-builders -----> 2 group grants + project access
cognipeer-portal-... -----> 3 portal access list
cognipeer-limits-... -----> 3 group limits
(everyone else) -----> default role, no groupsDesign rules that follow from the mechanics:
- Keep the default role low. Everyone who signs in and is not an administrator gets the one default role of the connection (
user,project_admin,portal_useroradmin;userunless you change it). Raise people through groups, not through the default. - Make administrators only through the admin claim. It is the one place where the IdP decides the workspace role.
- One group per purpose. A person may be in several, and the access adds up: a workspace level is the highest of the person's own level and each group's grant, and a project level can only lower it. See How the settings combine.
- Pick the default role for your audience. With
portal_usera person signs in only to use portals, never the dashboard, and non-administrators of this connection are allportal_user. Withuser, people can use the console where they have a project, and auserwith no project who opens the dashboard sees the "No project" page. One connection has one default role: if builders and portal-only people sign in through the same workspace, chooseuserand let portal access lists decide who opens which portal. - Seats. A role is either a console seat or a portal seat. On the hosted service the plan limits each kind, and a sign-in is refused when no seat is free for the role.
Who does what
| Who | Does | Needs from the others |
|---|---|---|
| IdP administrator | Registers the OIDC application with the redirect URI <APP_URL>/api/auth/sso/callback. Sends a groups claim (and the claim that marks administrators). Creates the groups and keeps their members. Provides one test person per group. | The group names and claim names from the Cognipeer administrator. |
| Security team | Decides who is in the administrators group and what the default role is. Approves the group-to-access table. Signs off the acceptance test. Decides how leavers are handled (see What is not supported). | The acceptance results. |
| Cognipeer administrator (workspace owner or admin) | Enters the SSO or LDAP settings. Maps groups. Sets what each Cognipeer group grants. Sets portal access lists and limits. Runs the test sign-in. | Group names, claim names and the redirect URI status. |
| Business owner | Says which team needs which agents, portals and how much usage. Asks the IdP administrator to add or remove people: members of a directory group cannot be edited in Cognipeer. | The group-to-access table, to review. |
Rules you can rely on
These come from how the sign-in code decides roles and groups.
Role mapping
- The admin claim (
adminClaimNamewithadminClaimValuesfor SSO; admin group DNs for LDAP) makes a person anadmin. Values are compared ignoring case. Anyone else gets thedefaultRole. - Roles a directory may hand out:
admin,project_admin,user,portal_user. No directory makes anyone workspace owner; adefaultRolethat is none of these gives the lowest role,user. - The role is recomputed at every sign-in (Sync role from the directory, on unless switched off): people are promoted when they gain the admin claim and demoted when they lose it. The role of such accounts then follows the directory and cannot be edited by hand.
- The workspace owner is never changed by a directory.
- With no admin claim configured, administrators made in Cognipeer are kept: the directory has no say about administrators.
- A token that carries no admin claim at all counts as "not an administrator", so an administrator made in Cognipeer is demoted at that sign-in (never the owner). Check the claim in the IdP before turning role sync on. A claim that is present but unreadable as plain text, or that the IdP did not put in the token (Entra ID groups overage), says nothing and never demotes. Switching Sync role from the directory off stops demotion at once.
Linking to an existing account
- A person is matched by the IdP subject first, then by email.
- A directory identity is refused when it would link to an existing local account that is an owner or an administrator, unless the IdP maps that person to
admin. The person sees an error on the sign-in page (account-link-refused) and only an administrator can resolve it: map the person as administrator in the IdP, or use a different account. - A login-disabled account (a programmatic user) is never signed in this way (
login-disabled).
Groups
- Groups are reconciled at every sign-in, but only when Sync groups from the directory is on and at least one mapping exists. Mappings are pairs of IdP group and Cognipeer group.
- The groups claim is
groupsunless you name another; a dotted name such asrealm_access.rolesreads a nested claim. IdP group names are matched as written (case matters). - A Cognipeer group that does not exist yet is created at the first sign-in that needs it, described as
Synced from SSO groupfollowed by the IdP group name, with no grants. Open it under Settings → IAM center → Principals → Groups and set what it grants. Membership of such a group is read-only in Cognipeer. - You can instead create the group by hand first, set its grants, and name it in the mapping. The person is then added with a directory-made membership. Only those memberships are ever removed; members you added by hand are never touched.
- If a mapped name belongs to a group of another directory (for example an LDAP group with the same name), nobody is put into it. Rename the Cognipeer group in the mapping.
- When the token has no groups claim, or the IdP sent an overage marker instead of the list, memberships are left as they are. Nothing is added or removed.
- Role changes and group membership changes made by a sign-in are written as audit events (
user.role.change,group.member.add,group.member.remove) withdirectory:oidcordirectory:ldapas the actor. None of this ever fails a sign-in, except a move to the portal role when the plan has no portal seat left.
Default projects
A person who is not an administrator needs a project to land in. Default projects (set per connection, with a role per project) are given either only when no group rule matched (the recommended mode) or to everyone, and at the first sign-in only (recommended) or at every sign-in. People who signed in before the rules existed can be caught up with Catch up existing people.
What a person with no mapping sees
| Situation | What happens |
|---|---|
| No workspace claims the person's email domain | They return to the sign-in page with an error. No new workspace is created. |
| The workspace claims the domain, but no admin claim matches and no group rule matches | An account is created with the default role, in no groups. It gets projects only if you configured default projects. |
Role user or project_admin and no project reached | The "No project" page, with a form to request access. |
Role portal_user | The portals page (/p). They never open the dashboard. |
Role admin | Every project. |
| Hosted service, and the plan has no free seat for the role | The sign-in fails. |
Domains that a connection claims (allowedEmailDomains) are what routes a sign-in to a workspace. Public mailbox domains are rejected, and a domain already claimed by another workspace is refused when you save.
Steps
- IdP. Register an OIDC application with the redirect URI
<APP_URL>/api/auth/sso/callback(APP_URLis the public address in Configuration). Note the issuer, client ID and client secret. - IdP. Add a groups claim to the ID token and create the groups from Four groups, three layers. Decide which claim marks administrators (it can be the same groups claim).
- Cognipeer. Open Settings → Single Sign-On (as owner or admin). Enter issuer, client ID and secret, and the allowed email domains. Set the default role, the admin claim name and values, and Sync role from the directory.
- Cognipeer. Under Group sync, turn on Sync groups from the directory, set the Groups claim, and add one mapping per group (IdP group to Cognipeer group).
- Cognipeer. Under Projects on sign-in, add default projects only if you need a safety net. Save.
- Cognipeer. Create or open the Cognipeer groups and set what they grant, then add the groups to portal access lists and limits where the design says so.
- Run the acceptance test below before anyone else signs in.
For a self-hosted LDAP directory use Settings → LDAP Directory: the same role sync, group sync (with group DNs instead of IdP group names), default projects and test sign-in apply.
Acceptance test
Use the Test sign-in card in the Projects on sign-in section of the settings page. It shows what a person would get at their first sign-in, with the same rules as a real one, and writes nothing: no user, no group and no membership is created. For SSO it uses the settings on the page, saved or not; for LDAP it uses the saved settings, so save first.
- Pick one test person per group, plus one person who is in none of them.
- For SSO: paste each person's ID token claims as JSON (Insert example gives a starting shape) and choose Run test. For LDAP: type the username; the directory is searched with the service account, so no password is needed.
- Compare each result with your table.
| Test person | Expect in Result |
|---|---|
In cognipeer-admins | Workspace role: Admin. The note that admins reach every project. |
In cognipeer-builders | Workspace role: Member. The mapped Cognipeer group listed, with Exists (or Created at first sign-in). The projects the group grants, each with the reason "Group rule". |
| In a portal group | The mapped group listed. No projects is fine for a portal audience whose access list names the group. |
| In none of the groups | Default role, no groups, and either your default projects or "No project: the person sees the "Request access" page". |
The role label reads Member for user and also for portal_user; only Admin and Project admin have labels of their own.
- Read the warnings. "The token has no "groups" claim" means the IdP mapper or scope is missing. "The IdP sent a groups overage" means the list was not in the token. Name conflict, not joined means a group of another directory has that name.
- Then do one real sign-in per test person from a private window. The test does not exercise the redirect, the callback or, for LDAP, the password. For LDAP, verify the sign-in from the web form here: it is the one path the test does not cover.
- After the real sign-in, open the person under Settings → IAM center → Principals. It shows the effective level per service and where each level comes from. Open the group to see the membership.
- Remove the person from the IdP group, sign in again, and check that the membership is gone and, for an administrator, that the role was lowered.
- Keep the claims JSON of each test person with the acceptance record.
Verify
| What to run | What you should see |
|---|---|
| Run test for each test person | The role, groups and projects from your table, and the banner "The person lands in N project(s) and can start right away." for people who should reach a project. |
| A real SSO sign-in per test person | The dashboard (builders and administrators), the portals page (/p, portal_user), or the "No project" page (a person with no project). |
| The person in IAM center → Principals | The level per service matches the group grants you set. |
| The same person after leaving the IdP group | The group membership is gone after the next sign-in. |
Common problems
| Symptom | Cause | Fix |
|---|---|---|
Everyone is user, nobody is an administrator | The admin claim name or values do not match what the token carries, or the token has no such claim | Run the test with the real claims; fix the claim name or the values (compared ignoring case). |
| An administrator was demoted | The token carried no admin claim at that sign-in | Fix the IdP mapper or scope. To stop role changes at once, switch off Sync role from the directory. |
| An administrator made in Cognipeer is not demoted by the IdP | No admin claim is configured | Expected: without an admin claim the directory has no say about administrators. |
| A manual role change reverts at the next sign-in | Role sync is on | Change the role in the IdP, or switch role sync off. |
| Test says the token has no groups claim | Mapper or scope missing in the IdP, or the claim has another name | Add it, or set Groups claim to the real name. |
| The person is in the IdP group but in no Cognipeer group | Sync groups is off, the mapping is missing, the group name differs in case, or the IdP sent an overage | Check the switch, the mapping and the claim in the test. |
| The person is in the group but lands on "No project" | The group was created at first use and grants nothing yet | Set the group's project assignments, or add default projects. |
Sign-in refused for an existing administrator (account-link-refused) | A local owner or admin account has this email and the IdP does not map the person to admin | Map the person as administrator in the IdP. |
not_found after the IdP redirect | No workspace claims the email domain | Add the domain to the connection's allowed domains. |
email_not_verified | requireVerifiedEmail is on and the IdP says the address is not verified | Verify the address in the IdP, or turn the option off. |
| A leaver can still use their account | There is no SCIM; Cognipeer is not told | Disable the account in Cognipeer too. |
Next steps
- Authentication: every SSO and LDAP field.
- Authorization (IAM): roles, levels, group grants and project permissions.
- Portal access boundaries: who may open a portal.
- Limits and quotas: limits for the groups you created.
- Multi-Tenancy and Licensing.

