> ## Documentation Index
> Fetch the complete documentation index at: https://statsig-4b2ff144-devin-1763168466-llm-docs-audit.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Okta SCIM Org Roles

> For every user, Statsig surfaces a SCIM field named `statsigOrgRole`. Through this field, you can manage organization user roles. Currently, Okta can

## Update Okta User Org Role

For every user, Statsig surfaces a SCIM field named `statsigOrgRole`. Through this field, you can manage organization user roles.
Currently, Okta can only push role updates to Statsig. We currently support the following org roles: `Member` `Admin` `Owner`

### Step 1. Create the Custom Attribute in Okta

Navigate to `Directory > Profile Editor` and select the User (default) Okta profile. This represents all of the Okta users' attributes.
Scroll down and press `Add Attribute` and fill out the new attribute to have the variable name `statsigOrgRole`.

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-devin-1763168466-llm-docs-audit/ZPlq0aPChN9H0_um/images/okta_scim_steps/org_steps/step1.png?fit=max&auto=format&n=ZPlq0aPChN9H0_um&q=85&s=008bb58e2021c72339299a7d17ea65b2" alt="img" width="1396" height="1514" data-path="images/okta_scim_steps/org_steps/step1.png" />
</Frame>

### Step 2. Create the Custom Attribute in the Statsig SCIM Integration

Now Navigate to the `Statsig SCIM Integration's User Profile` in the `Profile Editor`.
Add an new attribute that matches the following format:

* Variable name: `statsigOrgRole`
* External namespace: `urn:ietf:params:scim:schemas:core:2.0:User`
* Attribute type: either `Personal` or `Group`, depending if using groups for app assignment

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-devin-1763168466-llm-docs-audit/ZPlq0aPChN9H0_um/images/okta_scim_steps/org_steps/step2.png?fit=max&auto=format&n=ZPlq0aPChN9H0_um&q=85&s=c0668cd2c986e99d7b1589429e142d1e" alt="img" width="1292" height="1954" data-path="images/okta_scim_steps/org_steps/step2.png" />
</Frame>

### Step 3. Create a Mapping from Statsig to Okta for the Custom Attribute

On the same Statsig SCIM profile editor, navigate to the `Mappings` button.
Scroll down to the new attribute `statsigOrgRole` and map `user.statsigOrgRole` to the Okta attribute `statsigOrgRole`.

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-devin-1763168466-llm-docs-audit/ZPlq0aPChN9H0_um/images/okta_scim_steps/org_steps/step3.png?fit=max&auto=format&n=ZPlq0aPChN9H0_um&q=85&s=8c074e4dcf4b627eab682cd559e2d7f3" alt="img" width="2004" height="830" data-path="images/okta_scim_steps/org_steps/step3.png" />
</Frame>

### Step 4. Create a mapping from Okta to Statsig for the Custom Attribute

Now navigate to the Okta User to Statsig SCIM user mapping.

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-devin-1763168466-llm-docs-audit/ZPlq0aPChN9H0_um/images/okta_scim_steps/org_steps/step4_1.png?fit=max&auto=format&n=ZPlq0aPChN9H0_um&q=85&s=60f42362a6c9ad822680ce08b3e8d7dc" alt="img" width="1930" height="614" data-path="images/okta_scim_steps/org_steps/step4_1.png" />
</Frame>

Scroll down to the `statsigOrgRole` attribute and map `user.statsigOrgRole` to the Okta attribute `statsigOrgRole`.

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-devin-1763168466-llm-docs-audit/ZPlq0aPChN9H0_um/images/okta_scim_steps/org_steps/step4_2.png?fit=max&auto=format&n=ZPlq0aPChN9H0_um&q=85&s=d26d92ba8593f02fc02cd47e7a7f5beb" alt="img" width="1822" height="522" data-path="images/okta_scim_steps/org_steps/step4_2.png" />
</Frame>

Now all users will be synced with their organization role. On the Statsig SCIM integration you can modify a user's role directly as well.

### Step 5. Modify Integration Mappings

Navigate to the Statsig SCIM integration provisioning section.
Under the "To App" tab, scroll down to the `statsigOrgRole` attribute.

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-devin-1763168466-llm-docs-audit/ty_w0n2kolWT1Y51/images/okta_scim_steps/org_steps/step5_1.png?fit=max&auto=format&n=ty_w0n2kolWT1Y51&q=85&s=fb6ee5ef098057e1ed0ec94c38d0307d" alt="img" width="1394" height="480" data-path="images/okta_scim_steps/org_steps/step5_1.png" />
</Frame>

Set the attribute value to `Map from Okta Profile` and `statsigOrgRole`.
Set apply on `Create and update`.

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-devin-1763168466-llm-docs-audit/ty_w0n2kolWT1Y51/images/okta_scim_steps/org_steps/step5_2.png?fit=max&auto=format&n=ty_w0n2kolWT1Y51&q=85&s=48c32ab63496262fcdeb9465ad32f3a8" alt="img" width="1548" height="622" data-path="images/okta_scim_steps/org_steps/step5_2.png" />
</Frame>

Navigate to the "To Okta" tab and scroll down to the `statsigOrgRole` attribute.

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-devin-1763168466-llm-docs-audit/ty_w0n2kolWT1Y51/images/okta_scim_steps/org_steps/step5_3.png?fit=max&auto=format&n=ty_w0n2kolWT1Y51&q=85&s=fe002d57970743e9031938a1547cdbf5" alt="img" width="1386" height="456" data-path="images/okta_scim_steps/org_steps/step5_3.png" />
</Frame>

Set the attribute value to `Map from Statsig Profile` and `statsigOrgRole`.
Set apply on `Create`.

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-devin-1763168466-llm-docs-audit/ty_w0n2kolWT1Y51/images/okta_scim_steps/org_steps/step5_4.png?fit=max&auto=format&n=ty_w0n2kolWT1Y51&q=85&s=a481d6ed80cf495500dc1fc24a99c1c1" alt="img" width="1548" height="526" data-path="images/okta_scim_steps/org_steps/step5_4.png" />
</Frame>
