Skip to content

Okta SSO Example (SAML)


This example uses an Okta account to sign in to the TrueWatch workspace. Prepare the application management permissions for the Okta organization, the SSO management permissions for the target workspace, and an Okta test user with a corporate email address configured. This example uses alice@example.com.

Steps

1. Create an Okta application

  1. Sign in to your organization's Okta Admin Console. If you are taken to the employee app dashboard, click Admin to enter the Admin Console. If you are using Okta for the first time, create or join an organization first. Okta documentation on creating a SAML app

  1. Go to Applications and Resources > Applications and click Create App Integration. In the legacy console, this is under Applications > Applications.

  1. If wizard type options appear, select Classic experience. Select SAML 2.0 and click Next.

2. Configure SAML for the Okta application

Note: This step maps Okta application attributes to TrueWatch attributes, establishing a trust relationship between Okta and TrueWatch so that they trust each other.

  1. In General Settings for the newly created application, enter an application name, such as "okta", and then click Next.

  1. In Configure SAML > SAML Settings, enter temporary values so that you can create the application and download the metadata first. Replace <auth-domain> with the authentication domain of your site, and paste the actual values generated by the console in Step 5.
Okta field Temporary value
Single sign-on URL https://<auth-domain>/saml/assertion
Audience URI (SP Entity ID) https://<auth-domain>/saml/metadata.xml

Keep Use this for Recipient URL and Destination URL selected. Under Show Advanced Settings, confirm that Assertion Signature is Signed. Okta SAML field reference

  1. Add a row under Attribute Statements (optional). Set Name to Email, keep Name format as Unspecified, and set Value to user.email. This uses the email address in the Okta user profile; confirm that this field for the test user is alice@example.com.

  1. Click Next. If Feedback appears, select I'm an Okta customer adding an internal app and click Finish to complete the creation.

3. Obtain the Okta metadata document

Note: In this step, you can obtain the metadata document for creating an identity provider in TrueWatch.

  1. Open Sign On for the application you just created, and under Sign on methods, open Metadata URL. In the legacy interface, you can click Identity Provider metadata.

  1. Save the complete XML content as okta-idp.xml and confirm that the file contains IDPSSODescriptor. If the browser saves a web page, copy the XML text from the metadata page into a plain text file, and then save it as .xml.

4. Add a SAML identity provider in TrueWatch

  1. In the target workspace, go to Manage > Member Management > SSO Management > User SSO, select SAML, and click Add Identity Provider.
  2. For Identity Provider, enter Okta; for Metadata Document, upload the okta-idp.xml saved in Step 3.
  3. In Mapping Configuration, set both Email and Username to Email, consistent with Name in Step 2. Fill in Mobile Number as needed.
  4. In Access Restrictions, enter alice@example.com, select Role Authorization, confirm Session Persistence, and then save. For testing, you can select Read-only Member and use the default duration.
  5. Click Edit for the identity provider, and copy the Entity ID and Assertion URL respectively from Service Provider Details.

5. Replace the SAML assertion URL in Okta

On the General page of the Okta application, find SAML Settings and click Edit. In the wizard, go to Configure SAML, and replace the temporary values with the values copied in Step 4 according to the table below. Keep the full paths of the URLs, and then click Next > Finish.

Okta field Value
Single sign-on URL The Assertion URL for TrueWatch
Audience URI (SP Entity ID) The Entity ID for TrueWatch

6. Configure Okta users

  1. Under Assignments > Assign, select Assign to People.

  1. Select the user who needs to use SSO to sign in to TrueWatch (for example, alice@example.com) and click Assign.

  1. Click Save and Go Back to complete the user configuration.

  1. Click Done to return to Assignments, and confirm that the test user appears in the list. If you need to authorize by group, use Assign to Groups and confirm that the test user belongs to the selected group.

7. Verify sign-in

  1. In the SAML list in TrueWatch, confirm that Okta is enabled.
  2. In an incognito window, open the TrueWatch sign-in page for your site, click Single Sign-On, and enter alice@example.com. Click Get Sign-in URL, select Okta, and click Authenticate/Sign In.
  3. On the Okta sign-in page, complete authentication with the assigned test account. After returning to TrueWatch, enter the target workspace and verify the role. If Okta indicates that the user is not assigned to the application, check Assignments. If you see a message that the email address cannot be found after returning, confirm that the value of Email is user.email and that the test user's email field has a value. Troubleshoot sign-in