Skip to main content

Single sign-on (SSO)

With single sign-on your employees sign in to PingZen with their work account. Your identity provider checks the password and the second factor; PingZen trusts only what it signs. Any provider that speaks OpenID Connect works: Keycloak, Microsoft Entra ID, AD FS, Okta, Authentik, Dex and others.

The connection belongs to your account: open your profile menu (your email at the bottom of the sidebar) → Single sign-on (SSO). Setting it up takes about ten minutes, and nothing changes for employees until you turn it on.

What you need

  • Admin access to your provider: for Keycloak, the realm employees sign in to.
  • The provider reachable over https from PingZen’s server. If it sits behind a firewall, the setup form shows the addresses PingZen calls from.
  • A DNS TXT record on your email domain, to prove the domain is yours.

1. Create the connection

Press Add connection and fill in two fields:

  • Name — anything your team recognises, e.g. “Acme Keycloak”.
  • Issuer URL — for Keycloak https://sso.company.com/realms/<realm>. PingZen reads the provider’s settings from <issuer>/.well-known/openid-configuration right away, so a typo shows up here, not at the first sign-in.

Keep the client ID pingzen unless your provider already has a client for PingZen. The client secret can wait: the provider issues it once the client exists.

2. Create the client at your provider

Keycloak. Press Download for Keycloak in the connection’s setup steps. In the Keycloak admin console open your realm → Clients → Import client → Browse…, pick the file and press Save. The file sets up everything PingZen needs:

SettingValue
Client authenticationOn: a confidential client with a secret
FlowsStandard flow only; implicit, direct access grants and service accounts off
PKCES256
Valid redirect URIsPingZen’s redirect URI, exactly
Back-channel logout URLPingZen’s back-channel logout URL, session required

Other providers. Create an OpenID Connect web application with the authorization code flow and a client secret. Register the Redirect URI shown in the connection. If the provider supports back-channel logout, register the Back-channel logout URL too. PingZen asks for the openid, email and profile scopes, and the ID token must carry the user’s email.

If the provider shows “Invalid parameter: redirect_uri” during a sign-in, the redirect URI at the client differs from the one PingZen shows. They must match character for character.

3. Paste the client secret

Keycloak shows it on the client’s Credentials tab → Client secret. Paste it into the setup step and save. PingZen stores the secret encrypted and never shows it again; to change it, paste a new one under Connection settings.

4. Test the sign-in

Press Test sign-in. You sign in at your provider yourself, and PingZen checks everything an employee’s sign-in goes through: the issuer, the code exchange with your secret, the ID token’s signature, audience, nonce and lifetime. Then it shows what the provider sent and what would happen to the account. The test creates no account and no session, and works on a draft.

The report saysWhat to fix
The provider refused the client ID or secretKeycloak: Client authentication must be On. Copy the secret again from Credentials.
The provider refused the scopes PingZen asks forKeycloak answers invalid_scope when the client lacks the email or profile client scope: add them on the client’s Client scopes tab.
The provider sent no email addressGive the user an email address at the provider.
The token was issued for another clientThe client ID in PingZen differs from the one at the provider.
The clocks differThe provider’s server time is off. Sync it with NTP.
PingZen’s server could not reach your providerAllow the addresses from the setup form in the provider’s firewall.

A passed test with “outside the verified domains” is normal before step 5: the provider works, and PingZen will let employees in once the domain is verified.

5. Verify your email domain

Under Email domains add the domain of your employees’ email, e.g. company.com. PingZen shows a TXT record: _pingzen-challenge.company.com with a value to copy. Add it at your DNS host and press Check. DNS changes can take up to an hour to appear.

Only employees whose email is in a verified domain can sign in, and a domain verified by one organisation cannot be claimed by another.

6. Choose the workspaces employees join

Pick your workspaces and a role, Viewer or Editor. An employee joins them at their sign-in. Seats count against your plan: if a workspace is full, the employee still signs in and sees a message, and you get an email with who is waiting, at most once a day per workspace. They join at their next sign-in once a seat is free.

7. Turn it on

Press Turn on. Employees can now sign in two ways:

  • On the sign-in page, Sign in with SSO, then their work email.
  • By the connection’s own link, Sign-in link for employees in the connection, e.g. https://pingzen.dev/sso/acme.

With Create PingZen accounts on first sign-in on, an employee without an account gets one. An existing PingZen account with the same email is linked to the work account at the first sign-in.

How long a sign-in lasts

A sign-in lasts 48 hours by default (1 to 168, under Connection settings). After that PingZen sends the employee to your provider again.

Within that time PingZen asks the provider whether the session is still valid: when the open tab renews its access, at most every 5 minutes. If you end an employee’s session or disable them in Keycloak, the provider refuses, and PingZen signs them out. With back-channel logout registered, the provider tells PingZen the moment the session ends. Either way an open tab keeps working until its access expires, 15 minutes at most.

Employees and sign-in problems

Employees signed in through SSO lists everyone who has signed in, their last sign-in and live sessions.

  • Sign out ends their SSO sessions: they can no longer renew access, and an open tab stops within 15 minutes. It does not touch a sign-in with a password or Google into the same account, nor their workspaces; to cut access completely, also remove them from the workspaces.
  • Unlink makes PingZen forget which account at the provider is theirs. Use it when an employee was re-created at the provider and now gets “already linked to another company account”. The PingZen account and its data stay. The next sign-in links it again by email, if the email at the provider is the account’s email; otherwise it creates a new account, or is refused when new accounts are off.

When employees are refused, the connection shows the reasons and how many times it happened today and yesterday. Only refusals that got as far as your provider’s answer count: anyone with the sign-in link could fake the rest. The same reasons appear in the test report, with the fix.

Through MCP

Everything except the test sign-in can be done by an AI agent through MCP: create_sso_connection (the secret is optional and never printed back), get_sso_keycloak_client, update_sso_connection, add_sso_domain, verify_sso_domain, set_sso_workspaces, set_sso_connection_status, list_sso_members, sign_out_sso_member and unlink_sso_member. The test sign-in needs you at the provider’s sign-in page, so it runs in the browser.

Security

  • Authorization code flow with PKCE S256, a nonce, and a state bound to the browser that started the sign-in.
  • The issuer is checked on the way back (RFC 9207) when the provider supports it, and the ID token’s signature, audience, nonce and lifetime on every sign-in.
  • The client secret is stored encrypted and is write-only in the interface, the API and MCP.