> ## Documentation Index
> Fetch the complete documentation index at: https://statsig-4b2ff144-mintlify-java-core-statsig-options-migrati.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Okta SCIM Org Roles

## 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-mintlify-java-core-statsig-options-migrati/lr3Lh3_48VKvJYsX/images/okta_scim_steps/org_steps/step1.png?fit=max&auto=format&n=lr3Lh3_48VKvJYsX&q=85&s=d4ca2cf017eebf14fa75e8bef3b99201" 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-mintlify-java-core-statsig-options-migrati/lr3Lh3_48VKvJYsX/images/okta_scim_steps/org_steps/step2.png?fit=max&auto=format&n=lr3Lh3_48VKvJYsX&q=85&s=0562e7f72898a0bb5cf0a214a280bf15" 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-mintlify-java-core-statsig-options-migrati/lr3Lh3_48VKvJYsX/images/okta_scim_steps/org_steps/step3.png?fit=max&auto=format&n=lr3Lh3_48VKvJYsX&q=85&s=8a7f7305b48361801d77dffdffcff209" 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-mintlify-java-core-statsig-options-migrati/lr3Lh3_48VKvJYsX/images/okta_scim_steps/org_steps/step4_1.png?fit=max&auto=format&n=lr3Lh3_48VKvJYsX&q=85&s=95159de437b960c23aaf2087c4bd8328" 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-mintlify-java-core-statsig-options-migrati/lr3Lh3_48VKvJYsX/images/okta_scim_steps/org_steps/step4_2.png?fit=max&auto=format&n=lr3Lh3_48VKvJYsX&q=85&s=11bef30d3dfbf7a8ed8cb13d5cdddaed" 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-mintlify-java-core-statsig-options-migrati/lr3Lh3_48VKvJYsX/images/okta_scim_steps/org_steps/step5_1.png?fit=max&auto=format&n=lr3Lh3_48VKvJYsX&q=85&s=33e9ccfa7d985ae5f148537800aaf11b" 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-mintlify-java-core-statsig-options-migrati/lr3Lh3_48VKvJYsX/images/okta_scim_steps/org_steps/step5_2.png?fit=max&auto=format&n=lr3Lh3_48VKvJYsX&q=85&s=428c22b859d0f410f0471f2103b565d6" 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-mintlify-java-core-statsig-options-migrati/lr3Lh3_48VKvJYsX/images/okta_scim_steps/org_steps/step5_3.png?fit=max&auto=format&n=lr3Lh3_48VKvJYsX&q=85&s=4f3e252653ed84b7cf50e0a2046f5a26" 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-mintlify-java-core-statsig-options-migrati/lr3Lh3_48VKvJYsX/images/okta_scim_steps/org_steps/step5_4.png?fit=max&auto=format&n=lr3Lh3_48VKvJYsX&q=85&s=41837e1814e12f16dcac76c541ffebd3" alt="img" width="1548" height="526" data-path="images/okta_scim_steps/org_steps/step5_4.png" />
</Frame>
