> ## Documentation Index
> Fetch the complete documentation index at: https://statsig-4b2ff144-kill-dead-node-pages.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.

### 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-kill-dead-node-pages/Vb2HaaR2D_Fcseq_/images/okta_scim_steps/org_steps/step1.png?fit=max&auto=format&n=Vb2HaaR2D_Fcseq_&q=85&s=db2a3bcd2e08ea486ffe1b0195f9b413" 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`

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-kill-dead-node-pages/Vb2HaaR2D_Fcseq_/images/okta_scim_steps/org_steps/step2.png?fit=max&auto=format&n=Vb2HaaR2D_Fcseq_&q=85&s=493897b8b7bf950ebbd5548efcf61fb7" 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-kill-dead-node-pages/Vb2HaaR2D_Fcseq_/images/okta_scim_steps/org_steps/step3.png?fit=max&auto=format&n=Vb2HaaR2D_Fcseq_&q=85&s=bf1dd1319ff59da2c7808271f215499e" 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-kill-dead-node-pages/Vb2HaaR2D_Fcseq_/images/okta_scim_steps/org_steps/step4_1.png?fit=max&auto=format&n=Vb2HaaR2D_Fcseq_&q=85&s=0c1cb12c7c9922234ebd4394dcb610ae" 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-kill-dead-node-pages/Vb2HaaR2D_Fcseq_/images/okta_scim_steps/org_steps/step4_2.png?fit=max&auto=format&n=Vb2HaaR2D_Fcseq_&q=85&s=00088ef87aafa0d6284d7eb2f5f5de9d" 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-kill-dead-node-pages/Vb2HaaR2D_Fcseq_/images/okta_scim_steps/org_steps/step5_1.png?fit=max&auto=format&n=Vb2HaaR2D_Fcseq_&q=85&s=add81cf783c30e9e041cde79db24419d" 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-kill-dead-node-pages/Vb2HaaR2D_Fcseq_/images/okta_scim_steps/org_steps/step5_2.png?fit=max&auto=format&n=Vb2HaaR2D_Fcseq_&q=85&s=9e7bd053e1afe9360376b6e8ce73eac2" 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-kill-dead-node-pages/Vb2HaaR2D_Fcseq_/images/okta_scim_steps/org_steps/step5_3.png?fit=max&auto=format&n=Vb2HaaR2D_Fcseq_&q=85&s=f47f88c9242b79a18a4b3b67f1553545" 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-kill-dead-node-pages/Vb2HaaR2D_Fcseq_/images/okta_scim_steps/org_steps/step5_4.png?fit=max&auto=format&n=Vb2HaaR2D_Fcseq_&q=85&s=a7eb83f5bf5b556286679fc9c3b4c3be" alt="img" width="1548" height="526" data-path="images/okta_scim_steps/org_steps/step5_4.png" />
</Frame>
