# Okta SSO Login

{% hint style="info" %}
**SSO** feature <mark style="background-color:yellow;">requires a whitelist for activation</mark> and is intended for enterprise clients.
{% endhint %}

> **Note:**
>
> To activate this feature, please get in touch with the relevant sales representative or customer success manager (<sales@d5techs.com>), and provide the team owner's account.&#x20;

## Prerequisites

* An account with **Okta administrator privileges** is required.

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2Fva054tSzRHUACApLx5zi%2Fimage.png?alt=media&#x26;token=c6964da7-a3f6-4270-8ed0-1958f8a568e3" alt=""><figcaption></figcaption></figure>

* In **Directory** → **Groups**, create the following **three groups** (names must match exactly):
  * `d5-superAdmin`
  * `d5-admin`
  * `d5-member`

User roles within the team will be assigned based on the group they belong to.

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FDzKtVLZ5cZhTJhPlsx3I%2Fimage.png?alt=media&#x26;token=2ef32aa4-4290-4c7e-b959-9579b24cc39d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FSTJQbIbsnvYEa1WTRpKM%2Fimage.png?alt=media&#x26;token=d2a1a007-89d9-41c0-9674-ed57c621c742" alt=""><figcaption></figcaption></figure>

***

## Configure SAML in Okta

1. Go to **Applications** → **Applications** and create a new application.

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FUUDPLqHzXCFfqny93dwT%2Fimage.png?alt=media&#x26;token=ddbb0d73-5386-4541-a099-23296a3469d9" alt=""><figcaption></figcaption></figure>

2. Select **SAML 2.0** as the sign-in method.

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2F7MP5U3vdcFidLdSRRYmA%2Fimage.png?alt=media&#x26;token=a16e798c-0993-455f-99ba-579ae6f67fe7" alt=""><figcaption></figcaption></figure>

3. Enter the **Application Name**, check **“Do not display application icon to users”**, then click **Next**.

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FVCTOov8f5TNz4yyiIGyC%2Fimage.png?alt=media&#x26;token=3654b1e3-3935-48ae-bdc8-ca46403abc1f" alt=""><figcaption></figcaption></figure>

4. Copy the **URL** and **Entity ID** from the D5-Myspace admin backend and paste them into the corresponding SAML configuration fields in Okta.

* **Name ID format:** `EmailAddress`
* **Application username:** `Okta username`

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FdEySJkjr3EpN3UZZA0uu%2Fimage.png?alt=media&#x26;token=02b43130-37f5-40fd-9ee6-26ba9f95b4e0" alt=""><figcaption><p>D5-Myspace-TeamDashboard</p></figcaption></figure>

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FdetHuLhvpXbqBqvxlIux%2Fimage.png?alt=media&#x26;token=1d2778ba-30be-4c06-9291-9f3e45eab0f0" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FfwVvkU48olbtXd1Y3VMo%2Fimage.png?alt=media&#x26;token=5a2a0cf4-5a64-407c-818c-883635da07cb" alt=""><figcaption><p>Okta</p></figcaption></figure>

5. Click **Next**, then click **Finish** on the feedback page.

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2F1u46Bhj7L0oJfTpOlb6l%2Fimage.png?alt=media&#x26;token=2479c720-693c-4d8b-9ed1-184be9862a94" alt=""><figcaption></figcaption></figure>

***

## **Okta → D5-Myspace Team Management Backend**

1. Open the application’s **Sign On** page in Okta.

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2F39eQpJbRHVMuRLQjynXw%2Fimage.png?alt=media&#x26;token=9ca17eba-e4c3-4d7b-b725-a5b08dfbdb59" alt=""><figcaption></figcaption></figure>

2. Click **Copy**, open a new browser tab, paste the URL, and visit it.Right-click the page and save it as `metadata.xml`.

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FtytMcvX4GoPGcgWToet7%2Fimage.png?alt=media&#x26;token=f15a6ea7-6f48-4ac3-97a2-e9aa3646137e" alt=""><figcaption></figcaption></figure>

3. Upload `metadata.xml` to the **D5-Myspace Team Management Backend**.

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2F7tiQNN6hRczmGTUJKdJT%2Fimage.png?alt=media&#x26;token=7d4a7399-3ffe-46bc-9ef6-98e1910bfd70" alt=""><figcaption></figcaption></figure>

***

## Configure SCIM in Okta

1. Go to **General** → **Edit**.

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FhyiSDMhxKDtNwI5K9KzL%2Fimage.png?alt=media&#x26;token=dd5bbe33-6f4f-499b-9cf6-b1cc57a5a5e9" alt=""><figcaption></figcaption></figure>

2. Under **Provisioning**, select **SCIM** and click **Save**.

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FWDVxRZg6KNZcx7PFCs5X%2Fimage.png?alt=media&#x26;token=ecfaf508-b722-4b96-94ac-d727106bfb64" alt=""><figcaption></figcaption></figure>

#### Provisioning Settings

In **Provisioning** → **Edit**, update the following settings and save:

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FmCWeTFPluu7h8NXlrxCZ%2Fimage.png?alt=media&#x26;token=5254adec-0c92-4f79-b964-c79c103a2070" alt=""><figcaption></figcaption></figure>

* **SCIM connector base URL**\
  Copy from:\
  `D5-Myspace Team Admin → SSO & Provisioning → Provisioning Management → SCIM Endpoint`

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FnF1pD0Wu146VfIRHHLc5%2Fimage.png?alt=media&#x26;token=f21b1a8b-20c9-481a-afa8-5161b9f9c274" alt=""><figcaption></figcaption></figure>

* **Unique identifier field for users**\
  `userName`
* **Supported provisioning actions**\
  Enable the **first four options**

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FiDPFeoBogiti2iUH8FMQ%2Fimage.png?alt=media&#x26;token=2f8df4cb-b5e1-4cd0-90a0-ee3f5718aa2c" alt=""><figcaption></figcaption></figure>

* **Authentication Mode**\
  `HTTP Header`
* **Authorization**\
  Copy the **Access Token** from:\
  `D5-Myspace Team Admin → SSO & Provisioning → Provisioning Management`
* To App\
  Click **Edit**, enable the **first three options**, and save.

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FzEVuuSWevLAVmtGC14dg%2Fimage.png?alt=media&#x26;token=6a939860-d144-4d54-959b-4d673d7651bb" alt=""><figcaption></figcaption></figure>

* **D5-SSO Attribute Mappings**\
  Keep only the required mappings and delete the rest.

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FFnt3zcabYFXQgCNEfHwG%2Fimage.png?alt=media&#x26;token=4d861c13-2e63-4628-86a8-9d29aaf5b555" alt=""><figcaption></figcaption></figure>

#### Push Groups

* Go to Push Groups and add the following three groups:
  * `d5-superAdmin`
  * `d5-admin`
  * `d5-member`

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2Fl7nVF4tuSaHOirAjh6di%2Fimage.png?alt=media&#x26;token=f91abc1a-7737-4aff-bf01-a1f27602392b" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2Fz6DZTXIbQrxWIOwTcUB5%2Fimage.png?alt=media&#x26;token=4a26967a-670e-4e1b-81d3-7cb1b86cfb7a" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FAc6pH51mZw9kdAO6lOTi%2Fimage.png?alt=media&#x26;token=f6fb81c9-084a-49ec-90de-1f2b2d9d7839" alt=""><figcaption></figcaption></figure>

#### Assignments

* Go to **Assignments** and add the users who will log in via SSO.

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2F0dgZj8ZPzpP6MLU6i6id%2Fimage.png?alt=media&#x26;token=ea8d61dc-3d75-40ef-aca0-572ca12763de" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FWmjR6gBadyO0rIi49WA3%2Fimage.png?alt=media&#x26;token=c78bd8ed-7a69-4feb-a9e7-68bf62bb305e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2Fr2nLVbSeQvGC97g295Zr%2Fimage.png?alt=media&#x26;token=e59674dc-a1b5-4585-96f6-78064bf3cd70" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FEx0jRdB4i8kNyj4QGnrn%2Fimage.png?alt=media&#x26;token=abf924e2-20eb-498e-8410-024c2f704e3a" alt=""><figcaption></figcaption></figure>

***

## D5-Myspace SSO Configuration

#### Access Control

* The configuration page is visible **only if**:
  * The team is on the **whitelist**, and
  * The logged-in user is the **team owner** or a **super admin**
  * SSO is **disabled by default**.

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FyfzkTnaNIg8KgjMTBgga%2Fimage.png?alt=media&#x26;token=842b232c-60aa-40a0-b5c9-1086f707325b" alt=""><figcaption></figcaption></figure>

#### Whitelist Behavior

* If **SSO & SCIM** are enabled and the team is removed from the whitelist:
  * All SSO & SCIM settings are automatically disabled.
* After re-adding the team to the whitelist:
  * Users must **manually re-enable SSO & SCIM**.

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FfQnPT0KKMFvh6YJNJw14%2Fimage.png?alt=media&#x26;token=324cafc8-2f84-4d22-b9ba-3fb7340b6b27" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FKm6Qz2v75dMgaVcZEKhM%2Fimage.png?alt=media&#x26;token=3e2dab87-d05d-4534-8e77-69495978f68a" alt=""><figcaption></figcaption></figure>

#### Configuration Options Explained

* **Identity Provider**
  * `Microsoft Entra` (default)
  * `Okta`
* **SSO Protocol**
  * Currently supports **SAML only**
* **Login Method**
  * `SSO + Username/Password` (default)
  * `SSO Only`
* **Domain**
  * Required
  * Leading/trailing spaces are trimmed
  * Domain format validation enabled
  * Max length: 128 characters
  * Domain is saved immediately; domain list may be empty

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2F3dUxeALVcgZaP3Yb45yd%2Fimage.png?alt=media&#x26;token=86eb6c68-4a00-422f-a308-a10e0f8bfa10" alt=""><figcaption></figcaption></figure>

#### Service Provider (SP) Information

* These values are **fixed**
* Users must manually copy them into the corresponding fields in Okta

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2F8e7eNZTzq3LyKdT2wx5F%2Fimage.png?alt=media&#x26;token=89629e28-1310-46ed-8130-4476e0a5d1f2" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FkOIQkZY3210xk8cGgUJV%2Fimage.png?alt=media&#x26;token=4fd112db-2016-4807-a3c4-06bdbf5de3dc" alt=""><figcaption></figcaption></figure>

#### Identity Provider (IdP) Information

* Upload the `metadata.xml` exported from Okta
* The system will parse it and automatically extract the **IdP Login URL**

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FoV9rXhgWzUVqdzSTajP0%2Fimage.png?alt=media&#x26;token=64f9fced-34c2-43e0-b01e-6b9a33eae0f4" alt=""><figcaption></figcaption></figure>

***

## D5-Myspace SCIM Configuration

After SAML is successfully configured:

1. Enable **Provisioning Management** in the D5-Myspace team admin.
2. The system automatically generates:
   * **SCIM Endpoint**
   * **Access Token**
3. Copy both values into Okta to complete the integration.

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2F7J2iLY45xXpGsR3WxHcB%2Fimage.png?alt=media&#x26;token=c6374fad-983b-4edd-8610-600aa01ef3ef" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FTuiLB2lSUYy1VTSH3r28%2Fimage.png?alt=media&#x26;token=2d565fdc-5a2f-45d6-8bbf-7792e724a34f" alt=""><figcaption></figcaption></figure>

***

## SSO Login Logic & Role Assignment

#### Account Creation

* If the user does **not exist** in D5:
  * Create the account and add it to the team
* If the user **already exists**:
  * Add directly to the team

#### Role Mapping Rules

* No Okta group assigned → role = **Member**
* Assigned to `d5-superAdmin`
  * If no super admin exists → role = **Super Admin**
  * If one already exists → role = **Member**
* Assigned to `d5-admin` → role = **Admin**
* Assigned to `d5-member` → role = **Member**
* Assigned to multiple groups → role = **Member**
* Owner’s role never changes, regardless of group
* Removing a user in Okta → SSO login fails; D5 data unchanged
* Changing Okta group → role does **not** change on SSO login
* Seat limit reached → SSO login fails until seats are increased

### Web Login

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FLymN0jpOtVPkqrano0bt%2Fimage.png?alt=media&#x26;token=02b12791-0a31-4a72-9839-848c52a1bef5" alt=""><figcaption></figcaption></figure>

#### Enabled SSO

* MySpace validates:
  * Email format
  * Email domain
* Email validity is handled by Okta

  Login methods:

  `SSO + Username/Password`\ <br>

  * Password, phone, WeChat, Gmail logins still work

  `SSO Only`

  * Personal login still works
  * Switching to **Team identity** shows an error
  * Owner is **not affected**

  `Disabled SSO`<br>

  * Login fails with error: **“SSO-SAML is disabled”**

### Client Login (D5 Render)

1. Enter company email and click **Next**
2. After Okta authentication:
   * Redirect to an intermediate page
   * Click **Open D5 Render**
3. Login completes successfully

Edge cases:

* Empty input → **Next** button disabled
* Unconfigured domain → “SSO login is not configured for this account”
* “Management only” accounts:
  * SSO succeeds
  * User cannot access Showreel features
  * Token is cleared → appears logged out in client

### SCIM Synchronization

* Triggered by events
* Sync completes within **\~5 minutes**

#### SCIM Scenarios

**Assignments changes**

* Removing a user in Okta → user removed from D5 team (except owner)
* Assigning user:
  * No group → Member
  * With group → role based on group
  * Existing admin → role unchanged unless overridden by group

**Group changes**

* Removed from all groups → role becomes Member
* Changed to `d5-superAdmin`
  * If no super admin exists → Super Admin
  * Otherwise → role unchanged
* Multiple groups → role determined by **last added group**
* Owner role never changes

#### SCIM Restrictions

When SCIM is enabled:

* Disable in D5 backend:
  * Manual role changes
  * Account attribute changes
  * Invite to team
  * Remove from team
* <mark style="color:red;">**Same restrictions apply in Group Management**</mark>

#### Seat Limit

* If seats are full:
  * SCIM sync fails in Okta

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FLTPNdMLRHtI7jxaphwfD%2Fimage.png?alt=media&#x26;token=9025d5c6-ea2f-44c1-a4e5-f6ffe1df74c0" alt=""><figcaption></figcaption></figure>

* After adding seats:
  * Admin must remove failed users from **Assignments**
  * Re-add them to trigger sync again

<figure><img src="https://3611830798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjbN1iGmN_HBnj_fyU9%2Fuploads%2FRSNKJFSZp0HM1HNkYNKC%2Fimage.png?alt=media&#x26;token=d5a7d55f-942b-42a2-b551-588312f005c0" alt=""><figcaption></figcaption></figure>
