Skip to content
Connect an agent

Single sign-on

Single sign-on

An Enterprise organisation can sign its members in through its own identity provider with OpenID Connect or SAML 2.0. Your people use the account they already have at Okta, Microsoft Entra ID, Google Workspace or any other OpenID Connect or SAML provider, and you decide who joins and whether the emailed code still opens the organisation.

TL;DR

QuestionAnswer
Which plan?Enterprise. On another plan the Single sign-on tab says so and offers nothing to fill in.
Which protocol?OpenID Connect, with the authorization code flow and PKCE, or SAML 2.0 with signed assertions, started from Plotwork. One protocol at a time. SCIM 2.0 provisioning adds, updates and removes members and gives roles by group.
Who sets it up?The owner or an admin, in the portal: open the organisation, then the Single sign-on tab. An API key cannot change it.
What do I need?An email domain you control, a DNS record you can publish for it, and an app registered at your provider: an OIDC web app, or a SAML app.
Who can sign in this way?Only people whose address is on a domain you verified. Nobody else, whatever the provider says.
What do new people get?Nothing, unless you turn on "Add people when they first sign in". Then they join as a member or a reader, never an admin, within your member limit.
Can I make it the only way in?Yes, with Require single sign-on. The owner keeps the emailed code as a way back in if the provider is down, and every such sign-in is recorded.
Can my provider manage members?Yes, with SCIM 2.0: it adds people, deactivates or removes them (their access ends at once), and moves them between groups that you map to roles. See section 7.
Can agents be kept in the organisation?Yes, with Agents connect to this organisation: people on your verified domains connect agents only to the organisation, which can see and disconnect them. See section 8.
Can I choose which agents connect?Yes, with Only approved agents can connect: an agent you have not approved cannot be connected to the organisation. See Allowed agents.
Can keys expire, or work only from our networks?Yes, with the key policy: keys expire after 30, 90 or 180 days, people connect agents through the browser instead of making keys, and keys work only from the ranges you list. See Key policy.
Do I need a client secret?No. With Microsoft Entra ID, a federated credential makes Entra trust Plotwork as an issuer; with Okta, Auth0, Ping and others, a private key JWT signs with a key Plotwork keeps for you. Neither stores a secret. See Entra ID and Okta.
Is the client secret safe?It is sealed (AES-256-GCM) before it is stored, and it is never shown again, not even to you. A signing key is sealed the same way, and only its public half is shown.

1. Prove your email domain

  1. In the Single sign-on tab, under Email domains, type the domain your members use, such as acme.com, and press Add domain.
  2. Plotwork shows a TXT record to publish:
FieldValue
TypeTXT
Name_plotwork-verify.acme.com
Valueplotwork-verify= followed by 64 characters, unique to your organisation and domain
  1. Publish it at your DNS host, then press Verify. Plotwork looks it up through Cloudflare's DNS over HTTPS. A record that is not found yet is not an error: DNS can take a few minutes to change, so press Verify again later.

A domain can be verified by one organisation only. Public mail domains such as gmail.com and outlook.com cannot be added. You can add up to 20 domains, and leaving the record in place after it is verified is fine but not needed.

2. Register Plotwork at your provider

Under Identity provider, choose the protocol your provider app speaks: OpenID Connect or SAML 2.0. Saving the other protocol later replaces the provider and turns single sign-on off until you turn it on again, so nobody is held to a provider that has not been tried.

With OpenID Connect

Register a web application at your provider. The tab shows the redirect URI to give it:

EnvironmentRedirect URI
Plotworkhttps://api.plotwork.dev/auth/sso/callback

Then copy three values back into the tab under Identity provider:

Field in PlotworkWhat it is
Issuer URLThe address that names your own tenant at the provider. Plotwork reads <issuer>/.well-known/openid-configuration to find the rest.
Client IDThe id the provider gave the app
CredentialClient secret, the default; Federated credential (Microsoft Entra ID), recommended there; or Private key JWT, for Okta, Auth0, Ping and others. The last two need no secret: once saved, the tab shows what to paste into your provider and a Rotate key button.
Client secretFor a client secret only: the secret the provider gave the app. Required the first time; leave it empty later to keep the one stored.

Press Save provider. Plotwork checks the issuer before it saves anything: the address must be HTTPS, the provider must offer the authorization code flow with PKCE and sign ID tokens with RS256 or ES256, and the issuer must be your own tenant. An issuer shared by every tenant, such as Microsoft's /common, is refused. If a check fails, the tab says which one.

With SAML 2.0

Create a SAML app at your provider. The tab shows three values for it, each with a copy button. They are your organisation's own, so an assertion made for another organisation never signs anyone in to yours:

Value in PlotworkWhere it goes at your providerExample
Entity ID (Audience URI)The service provider entity ID, audience or identifierhttps://api.plotwork.dev/auth/sso/saml/<organisation id>
ACS URL (Single sign-on URL)The assertion consumer service, reply URL or single sign-on URL. Also the recipient and destination, where the provider asks.https://api.plotwork.dev/auth/sso/saml/<organisation id>/acs
Plotwork metadata URLFor a provider that can read a service provider's metadatahttps://api.plotwork.dev/auth/sso/saml/<organisation id>/metadata

Set the provider to send the person's email address as the NameID, to sign the assertion (or the whole response) with SHA-256, and not to encrypt the assertion. Then give Plotwork the provider's metadata, either its address under Metadata URL or the XML pasted under Or paste the metadata XML, and press Save provider. Plotwork reads the metadata before it saves anything: it needs the provider's entity ID, a sign-in URL on the redirect binding, and an RSA signing certificate of at least 2048 bits. If a check fails, the tab says which one.

When the NameID is not the address, such as an opaque persistent ID, put the name of the attribute that carries the address under Email attribute. Leave it empty to read the NameID.

When your provider rotates its signing certificate, save the provider again with the same metadata URL (or the new XML). The tab lists each certificate with its fingerprint and expiry date.

Plotwork accepts only sign-ins it started: a response must answer the request Plotwork sent, in the same browser, within ten minutes. Starting from the app tile at your provider (IdP-initiated sign-in) is refused; people start from Plotwork's sign-in page.

Step-by-step pages for the three providers most teams use, for both protocols:

3. Turn it on

The Sign-in rules section has three switches and a role:

SettingWhat it does
Sign in with single sign-onPeople on your verified domains are offered your provider when they type their address on the sign-in page.
Require single sign-onMembers and admins on a verified domain open the organisation only after signing in through your provider. It needs the connection on and a verified domain.
Add people when they first sign inSomeone on a verified domain who is not a member yet joins when they first sign in, if there is room in your member limit.
Role for new peopleMember or reader. Never admin: promote a person on the Members tab.

Turning the connection off, removing the provider, or removing the last verified domain turns Require single sign-on off at the same moment, so nobody is locked out by a half-finished set-up.

Turn on single sign-on

4. How people sign in

  1. On the sign-in page, a person types their work address.
  2. If the address is on a verified domain of an organisation with single sign-on on, the page offers Continue with single sign-on, with Email me a code instead beside it.
  3. Their browser goes to your provider, they sign in there, and they come back signed in to Plotwork.

The first time, Plotwork links the provider's account to the Plotwork account with the same address, or makes one. After that the link wins: if the person's address changes at the provider, they still sign in to the same Plotwork account.

If a sign-in fails, the sign-in page says why in words:

Shown whenMeaning
The link has expired or was opened in another browserThe sign-in took longer than ten minutes, or the provider sent the browser back to a different browser. Start again.
Your identity provider did not sign you inThe person cancelled, or the provider refused them.
Your identity provider sent a sign-in Plotwork could not trustThe ID token or the SAML response failed a check: its signature, issuer, audience, recipient, time or nonce. Check the issuer and the client ID, or for SAML the entity ID, the ACS URL, that the assertion is signed and not encrypted, and that the metadata is current.
Your address is not on a domain your organisation verifiedThe provider named an address outside your verified domains, or said the address is not verified.
You are not a member of this organisation yetAdding people on first sign-in is off. Invite the person.
Your organisation has no free seatsAdding people on first sign-in is on, and the member limit is reached.
This environment is open to approved people onlySign-in to this Plotwork environment is restricted by its operator, and the address is not approved. Your provider is not at fault; ask Plotwork for access.

5. Require single sign-on and the way back in

With Require single sign-on on, a member or an admin whose address is on a verified domain and who signed in with an emailed code sees "Single sign-on required" on the organisation's pages, with a button that signs them in through your provider and brings them back.

The owner is never held to it. If your provider is down or set up wrongly, the owner signs in with an emailed code, opens the Single sign-on tab and fixes it. Every such sign-in is recorded in the audit log as a break-glass sign-in, so your security team sees it.

API keys and connected agents are not held to Require single sign-on: they reach the organisation through membership, which is checked on every call. Removing a member stops every key of theirs at once, and disconnects every agent they connected to the organisation.

6. What is recorded

Every change and every sign-in goes to the organisation's audit log:

EventWhen
Changed single sign-onThe provider was saved, changed or removed, or a switch changed, with its protocol and credential. The secret and the key are never recorded.
Rotated the single sign-on signing keyRotate key was pressed, with the new and the old key IDs. No key material is recorded.
Added, checked or removed a single sign-on domainA domain changed. A check records whether the record was found.
Signed in with single sign-onA person signed in through your provider.
Failed to sign in with single sign-onA sign-in failed after it started, with the reason.
Joined through single sign-onA person was added on first sign-in, with the role.
Changed the SCIM tokenA token was made, replaced or revoked. The token is never recorded.
Provisioned, updated, deactivated or deprovisioned a person over SCIMYour provider changed a member.
Changed a SCIM group, or a role to follow SCIM groupsYour provider changed a group, you chose its role, or a person's role followed their groups.
Signed in with an emailed code while single sign-on is requiredThe owner used the way back in.
Changed "Agents connect to this organisation"The switch was turned on or off.

7. Provisioning with SCIM

SCIM lets your identity provider manage your members for you: it adds people, deactivates or removes them (their access ends at once), and pushes groups that you map to roles. Set it up in the Provisioning with SCIM section of the tab:

ValueWhere it goes at your provider
SCIM base URL, https://api.plotwork.dev/scim/v2/<organisation id>The tenant URL, or SCIM connector base URL
Token, from Make tokenThe secret token, or bearer token. It is shown once: copy it straight away.

Step-by-step pages:

ProviderGuide
Microsoft Entra IDSCIM with Microsoft Entra ID
OktaSCIM with Okta
Any other SCIM 2.0 provider, such as OneLogin or JumpCloudProvisioning with SCIM, which also lists what Plotwork keeps, what it supports, and every refusal

8. Agents connect to the organisation

An agent that signs in with a browser can be connected to a person's own account or, by any member who is not a reader, to the organisation (Connecting an agent). Turn on Agents connect to this organisation, in the Agents section of the Single sign-on tab, to keep your people's agents in the organisation:

With it offWith it on
A person on a verified domainConnects an agent to their own account, or to the organisationConnects an agent only to the organisation. A reader cannot connect one
A person on another domainUnchangedUnchanged
What the agent publishesThe person's, unless they name the organisationThe organisation's
Who can disconnect itThe person, and for an organisation connection the owner and adminsThe person, the owner and the admins, under Connected agents in Keys and CI

It needs a verified domain to turn on, and Enterprise. Agents connected before you turn it on stay connected; disconnect them from Connected agents if you want them gone. A person who tries to connect an agent to their own account is told the organisation asks it. Turning it on or off is recorded in the audit log.

Allowed agents

Turn on Only approved agents can connect in the Allowed agents section of the Settings tab, then list the agents your organisation uses. The owner and admins set it, on Enterprise. While it is on, an agent that is not on the list cannot be connected to the organisation: the approval page says the organisation allows only approved agents and offers nothing that would be refused.

How the agent is recognisedWhenHow much it proves
By its metadata document addressThe agent publishes an OAuth client ID metadata documentStrong. Only the website that serves the document could have published it, and the code goes only to an address the document lists
By its name and where it returnsAny other agentA claim. Any agent can register any name; where it returns (an app on this computer, or a named app or website) narrows it

Add agents from the list of known agents (Claude Code, Cursor, VS Code, Claude Desktop, Windsurf, Codex and Goose, each by its name and where it returns), or from Approve from recent connections, which lists the agents your members connected in the last 90 days, each recognised the strongest way it can be. A known agent marked as not yet seen by Plotwork may register under another name; if it does not match, approve it from its recent connection.

ChangeWhat happens
Turn it on, or take an agent off the listBefore saving, the page says how many live connections the change ends, and asks. Ended connections are recorded as disconnected with the reason not_allowed, and the agent has to be approved and connected again
With Agents connect to this organisation also onPeople on your verified domains cannot connect an agent you have not approved at all, to any account
Turn it offEvery agent can be connected again. Nothing that was ended comes back

Keys made under Keys and CI are not agents and are not affected. Every change is recorded as orgs.settings.allowed_agents, with the agents added and removed.

Key policy

The Key policy section of the Settings tab sets how your organisation's API keys are held. The owner and admins set it, on Enterprise. The keys behind agents connected with a browser sign-in are a person's sign-in, and are not affected.

SettingWhat it does
Keys expire after: never, 30, 90 or 180 daysA key made after you set it expires that long after it is made. Keys that exist get an expiry date counted from the day you set it, unless theirs is sooner; the page says how many first. Keys and CI shows each date and the days left. The owner and admins are emailed 14 days and 3 days before a key expires, and a call with an expired key is refused with auth.key_expired
Agents sign in through the browser onlyMembers and readers on your verified domains cannot make API keys, and connect agents with a browser sign-in instead. Only the owner and admins make the organisation's keys, for CI. When you turn it on, the page says how many people already hold personal keys, and you can tick Also revoke those keys: each person is then emailed why, and how to connect with a browser sign-in. Connections are unaffected
Keys only from these networksUp to 20 IPv4 or IPv6 ranges, such as 203.0.113.0/24 or 2001:db8::/32. A call with one of the organisation's keys from anywhere else is refused with auth.key_network_refused, and recorded at most once a key an hour

GitHub-hosted runners call from addresses that change and are shared with other customers, so they cannot be allowed by range. Run the job on a self-hosted runner, or send it through a NAT gateway with a fixed address, and allow that address. Every change is recorded as orgs.settings.key_policy, and a key the daily clean-up ends as orgs.key.expired.

See also

PageWhy
OrganisationsRoles, members and invitations
Audit logWhere every sign-in and change is recorded
Plans and billingWhat Enterprise includes
Privacy policyWhat single sign-on stores, and for how long