Skip to content
Connect an agent
Hosted diagrams and plans

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.
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.

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
Client secretThe 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.

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.

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.

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. The secret is never 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.

7. Provisioning with SCIM

SCIM lets your identity provider manage your members for you. 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 SCIM connector base URL, or tenant URL
Token, from Make tokenThe bearer token, or secret token. It is shown once: copy it straight away. Replace token makes a new one and stops the old one at once.

Then turn provisioning on at your provider for creating, updating and deactivating users, and for pushing groups. Step-by-step pages for Okta and Microsoft Entra ID are below.

What your provider doesWhat happens in Plotwork
Creates a personTheir address must be on a domain you verified. The account is found or made, and they join as a member, within your member limit.
Updates a personTheir name is kept as the provider sends it. Their address cannot change: deprovision them and create the new one.
Deactivates a personThey leave the organisation at once, and every session they opened through your provider ends. Their API keys and agents stop at their next call.
Deletes a personThe same, and the provider's record of them goes. Their Plotwork account stays, with their own diagrams and other organisations.
Pushes a groupIt appears under Groups and roles.

Under Groups and roles, choose the role each group gives: Admin, Member, Reader or No role. While no group gives a role, SCIM never changes anyone's role. Once one does, each provisioned person's role follows their groups: the highest role their groups give, or Member when none of theirs gives one. The owner is never changed or removed.

Plotwork supports filtering users by userName and externalId, groups by displayName, paging with startIndex and count, and PATCH. It does not support bulk operations, sorting or password changes.

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