Raw: https://promptreports.ai/docs/okta-setup.md

# Set up PromptReports ID in Okta

Connect Okta to PromptReports ID once, and your people sign in to every family product with Okta. You keep Okta; the ID takes its sign-in and its SCIM changes.

For an Okta admin working with an owner or admin of your PromptReports organization. Every change on the SSO page is written to the organization's signed ledger.

| Part | State |
|---|---|
| Sign-in from Okta over OpenID Connect or SAML 2.0 | Built |
| SCIM provisioning | Built |
| PromptReports ID in the Okta Integration Network | Planned |

PromptReports ID will be listed in the Okta Integration Network once single sign-out and group mapping pass their production checks. Until it is, add it by hand with the steps below.

## 1. Verify your domain

Open your organization's SSO page at https://accounts.promptreports.ai/orgs/&lt;org id&gt;/sso. Add your email domain and publish the TXT record it shows, _promptreports-id.&lt;domain&gt;, with the value promptreports-id=&lt;token&gt;, then press Check now. A domain sends sign-ins to Okta only after it passes. The ID checks again every 7 days and stops after three failed checks in a row.

## 2. Connect sign-in over OpenID Connect

1. In Okta, open Applications, Create App Integration, choose OIDC and then Web Application.
2. Set the grant type to Authorization Code, and assign the people or groups who should sign in.
3. On your organization's SSO page, enter the issuer, which is https://&lt;your domain&gt;.okta.com or your custom authorization server's issuer, with the app's client id and secret, and save.
4. Copy the redirect URI the SSO page shows after that first save into the app's Sign-in redirect URIs in Okta.

## Or connect sign-in over SAML 2.0

The ACS URL is https://accounts.promptreports.ai/oauth/sso/&lt;connection id&gt;/saml/acs and the SP entity id is https://accounts.promptreports.ai/oauth/sso/&lt;connection id&gt;/saml/metadata, which also serves the metadata to import. The SSO page shows both, with the connection id, after the connection's first save. Saving one kind of connection replaces the other.

1. In Okta, open Create App Integration and choose SAML 2.0. Set Single sign-on URL to the ACS URL, Audience URI to the SP entity id, and Name ID format to EmailAddress.
2. Copy the issuer, the sign-on URL and the certificate from the app's Sign On tab into the SSO page, and save.

## 3. Provision people with SCIM

Make a SCIM token on the SSO page. It is shown once, and two can be active at a time so a rotation has no gap. The base URL is https://accounts.promptreports.ai/scim/v2/&lt;org id&gt;.

In Okta, open the app's Provisioning tab and choose the SCIM connector. Enter the base URL above, set the unique identifier to userName, choose HTTP Header auth with the token, and turn on create, update and deactivate.

New people join as approvers. Deactivating or deleting a person in Okta ends their membership, and the ID tells each family site they signed into (see PromptReports ID for admins). SCIM never creates, raises, deactivates or removes an owner or an admin.

## 4. Map groups to roles

Mapping groups to roles at the ID: Planned. When it is on, map each Okta group to a family role, and to a role per product where it differs (see PromptReports ID for admins).

## 5. Require SSO

With Require SSO on, email links, Google and passkeys are refused for addresses at your verified domains, and the person goes to Okta. Owners keep passkey sign-in, so a broken identity provider cannot lock the organization out, and each such sign-in is in the ledger.
