Skip to content

Connect an organisation's SSO

When an organisation wants its people to sign in with its own identity provider (Microsoft Entra ID, Google Workspace, Keycloak or any OpenID Connect provider), you do three things: register the identity provider, route the organisation’s email domains to it, and decide what a person from that domain becomes the first time they sign in. This guide does all three in the console. The design is in Federation; read it first if the vocabulary is new.

Every page and action here is anchor-tier. Pages are Identity & Access → Identity Providers and Identity & Access → Email Domains.

Action Identity provider permission Email-domain mapping permission
List and open platform:iam:identity-provider:view platform:iam:email-domain-mapping:view
Create …:identity-provider:create …:email-domain-mapping:create
Edit …:identity-provider:update (and view) …:email-domain-mapping:update (and view)
Delete …:identity-provider:delete …:email-domain-mapping:delete

Ask the organisation’s IdP administrator for:

  • the issuer URL of the provider;
  • a registered application (client) there, with its client id and client secret, and the platform’s callback URL added as an allowed redirect URI (<platform external URL>/auth/oidc/callback);
  • for Entra, whether the registration is single-tenant or multi-tenant, and the tenant id;
  • the email domains that belong to the organisation.

Decide, for each domain, who a new user from it is: ANCHOR (platform staff, every client), CLIENT (one named client), or PARTNER (a set of clients). You will be asked, and there is no default.

Create Identity Provider opens a form with these fields:

Field Notes
Code Unique, permanent.
Name Display text.
Type Internal (Local) for platform passwords, or OIDC (External). The seeded internal provider cannot be deleted.
Issuer URL The OpenID Connect issuer. For a multi-tenant provider this is the base the authorize and token endpoints hang from, for example …/organizations/v2.0 or …/common/v2.0.
Multi-Tenant Mode Switch on for a provider such as Entra common/organizations, where tokens from many tenants share one issuer URL.
Issuer Pattern Multi-tenant only: a regular expression naming the exact issuer(s) to accept.
Client ID From the provider’s app registration.
Client Secret Where the secret is held, and the value or reference: see below.
Allowed Domains One per line (commas and spaces also split). Lower-cased and de-duplicated.
Domain scope, Primary Client Appear once domains are listed: see step 2.

The page never reads the secret back. The drawer says Configured or Not configured; the edit form says whether one is set and leaves the field blank, and a blank value keeps the stored secret. Choose where the secret lives:

Choice You enter
Local Encrypted The secret itself. The platform encrypts it with its key (FLOWCATALYST_APP_KEY) and stores the encrypted form.
AWS Secrets Manager, AWS Parameter Store A reference. The platform resolves it at read time. See Configuration and secrets.
GCP Secret Manager, HashiCorp Vault The form offers these, but a scheme the platform cannot resolve is refused on save (UNSUPPORTED_SECRET_SCHEME). Use Local Encrypted or AWS.

If the platform has no encryption key the save is refused with ENCRYPTION_NOT_CONFIGURED.

Client authentication: secret, certificate or federated credential

Section titled “Client authentication: secret, certificate or federated credential”

For an OIDC provider, the platform proves who it is at the provider’s token endpoint when it exchanges the sign-in code. The Client authentication field of the form chooses how. Entra client secrets last at most 24 months, and when one expires every sign-in through the provider fails at the code exchange (AADSTS7000222); the other two methods avoid that.

Method What the token request carries Expires?
Client secret (default) The stored client secret. Yes, at the provider.
Certificate A signed client assertion (RFC 7523 private_key_jwt), signed with a certificate key the platform generated. The certificate is valid for 24 months; you rotate it ahead of time.
Federated credential A client assertion signed with the platform’s own RS256 signing key, the one published at /.well-known/jwks.json. No.

Existing providers stay on Client secret. A stored secret is kept when you switch to another method, so switching back works. The API takes the method as oidcClientAuthMethod (CLIENT_SECRET, CERTIFICATE or FEDERATED; anything else is INVALID_CLIENT_AUTH_METHOD). A client assertion is never accepted by the platform as a credential of its own.

Certificate. Save the provider with Certificate, open it, and choose Generate certificate. The platform generates an RSA 3072 key pair and a self-signed certificate; the private key never leaves the platform and is stored encrypted, so generating one needs the platform’s encryption key (ENCRYPTION_NOT_CONFIGURED otherwise). Choose Download .cer, then in Entra open App registrations, your app, Certificates & secrets, Certificates, and upload the file. To rotate, choose Generate next, upload that certificate to Entra as well, then Make active; the old certificate is deleted. Discard removes a next certificate you do not want. The provider page warns when the active certificate expires within 60 days.

Federated credential. Save the provider with Federated credential and open it. The page shows an Issuer (the platform’s), a Subject (identity-provider:<provider id>) and an Audience (api://AzureADTokenExchange). In Entra open App registrations, your app, Certificates & secrets, Federated credentials, Add credential, choose Other issuer, and enter the three values. Entra fetches the platform’s signing keys from /.well-known/jwks.json to verify the assertion, so the platform must be reachable from the internet at a public https:// address; the console and the start-up log warn when it is not.

A multi-tenant provider issues tokens for everyone with a Microsoft account. The platform therefore pins what it accepts three ways, and you must set all of them:

  1. Issuer Pattern: must name your tenant exactly, anchored ^…$, no wildcards (for example ^https://login\.microsoftonline\.com/<tenant-id>/v2\.0$). A broader pattern is refused when saved. A provider saved before that rule shows an Issuer pattern too broad warning in its drawer until you fix it.
  2. The email domain mapping’s allowed domains: the token’s email must be in a domain routed to this provider.
  3. Required OIDC Tenant ID on each mapping: the one tenant whose tokens are accepted.

Without all three a foreign tenant could mint identities on your platform. A pattern cannot be cleared once set; edit it to a tighter one instead.

2. Route the domains, with an explicit scope

Section titled “2. Route the domains, with an explicit scope”

When you add a domain that has no mapping yet, the form requires a Domain scope:

Scope Result for new users Extra field
Anchor Platform staff, every client none (a Primary Client is refused: PRIMARY_CLIENT_NOT_ALLOWED)
Client Bound to one client Primary Client required (PRIMARY_CLIENT_REQUIRED)

The identity provider form offers only Anchor and Client. Partner mappings are created on the Email Domains page. There is no default and no silent fall-through to Anchor: without a choice the request fails with MAPPING_SCOPE_REQUIRED before anything is written. The reason is that Anchor is the most powerful tier, and a quiet default would turn every person at a newly added domain into a platform operator. Removing domains needs no scope.

If a domain already has a mapping, the existing scope is left alone; choosing Client only links a client when the mapping has none, and an existing primary client is never overwritten. This is how you fix a mapping that was created without a client: edit the provider and set the scope and client.

Email Domains: partner, tenant and two-factor policy

Section titled “Email Domains: partner, tenant and two-factor policy”

Identity & Access → Email Domains is the per-domain view and the only place to create PARTNER mappings. Create Email Domain Mapping takes:

Field Notes
Email Domain Lower-cased. One mapping per domain.
Identity Provider The provider that owns the domain.
Scope Type Anchor, Partner or Client. Default Client. Cannot be changed after creation.
Primary Client Required for Client and Partner.
Required OIDC Tenant ID Required when the chosen provider is multi-tenant.
Two-factor policy Only for a provider that is not OIDC: require 2FA, allowed methods (Authenticator app, Email code), and remember-device days (1 to 365). Federated sign-in leaves second factors to the provider.

The list filters by scope and by provider name. In edit, the domain and scope are read-only; the provider, client, tenant and policy can change.

3. Sync roles from the provider (optional)

Section titled “3. Sync roles from the provider (optional)”

On an OIDC provider, Sync Roles from IDP makes each federated sign-in reconcile the user’s platform roles from the token’s roles claim. Choose Allowed Roles to limit what the provider may grant (the picker needs platform:iam:role:view). Only roles that came from the provider are replaced; roles you assigned by hand stay. A person removed upstream loses the synced roles at their next sign-in. See Federation for the mapping rules and failure behaviour.

  1. In a private browser window open the platform sign-in page and type an address in the routed domain. You should be redirected to the organisation’s sign-in.
  2. After sign-in, open Identity & Access → User Management. The new user exists, with the scope and home client from the mapping.
  3. If sign-in fails, open Platform → Login Attempts to read the reason. Typical causes: a redirect URI not registered at the provider, an issuer that does not match the pattern, a token from the wrong tenant, or an email whose domain is not routed to the provider.

Moving and releasing domains changes how real people sign in, so the console asks for confirmation.

  • Release a domain (remove it from an identity provider’s Allowed Domains): a warning appears and you must tick Save and release these domains. Released domains fall back to internal password sign-in. Users provisioned through SSO must reset their password before they can sign in, and roles synced from the provider are removed.
  • Move a mapping to another provider (Email Domains → edit → Identity Provider): a “Change Identity Provider” notice and a required checkbox explain the effect. To an internal provider, SSO users are converted and must reset their password. To an OIDC provider, password sign-in for the domain is disabled. The console reports how many users were converted.
  • Delete a provider: refused with DOMAINS_STILL_MAPPED while any domain routes to it. Release or move the domains first. The seeded internal provider cannot be deleted at all.

POST /api/identity-providers and PUT /api/identity-providers/{id} take mappingScope (ANCHOR or CLIENT) and primaryClientId for new domains. Email-domain mappings are under /api/email-domain-mappings. See the HTTP API reference.