> ## 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 Team Management

## Import Existing Statsig Teams

<Note>
  Teams are specific Statsig groups that exist within projects. They are not shared across projects. They also have two possible roles: `Admin` and `Member`.
</Note>

## Setup

* Ensure you have some teams created in Statsig.
* Navigate to the Statsig Project and create a team if you have none.

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-kill-dead-node-pages/dilvV2AX5QlHMhxA/images/okta_scim_steps/team_steps/step1-create-team.png?fit=max&auto=format&n=dilvV2AX5QlHMhxA&q=85&s=a201de9bbb99e5a09cd93e9a85ad2b9f" alt="img" width="3296" height="1824" data-path="images/okta_scim_steps/team_steps/step1-create-team.png" />
</Frame>

## Import Existing Groups

* In Okta, go to the Statsig app's "Import" tab
* Click "Import Now" to fetch existing Statsig users, groups, and teams
* After importing, you should see the group in your Okta groups following the format `Statsig-ProjectName-TeamName-RoleName`.

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-kill-dead-node-pages/dilvV2AX5QlHMhxA/images/okta_scim_steps/team_steps/step2-verify-import.png?fit=max&auto=format&n=dilvV2AX5QlHMhxA&q=85&s=5754c47c247f3076adb78b11000fdf70" alt="img" width="1960" height="838" data-path="images/okta_scim_steps/team_steps/step2-verify-import.png" />
</Frame>

## Create a Mapping Group

* To push a group of Okta users to a Statsig team, you must first create a mapping group.
* This group will contain the Okta members which will be part of the Team x Role Group.

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-kill-dead-node-pages/dilvV2AX5QlHMhxA/images/okta_scim_steps/team_steps/step3-create-mapping-group.png?fit=max&auto=format&n=dilvV2AX5QlHMhxA&q=85&s=21bac0acd66b05b161c37819988b375c" alt="img" width="2042" height="1318" data-path="images/okta_scim_steps/team_steps/step3-create-mapping-group.png" />
</Frame>

## Push Teams to Statsig

1. In Okta, go to the Statsig Integration's "Push Teams" tab and select "Push Groups". Then pick the mapping group created in the previous step.
   <Frame>
     <img src="https://mintcdn.com/statsig-4b2ff144-kill-dead-node-pages/dilvV2AX5QlHMhxA/images/okta_scim_steps/team_steps/step4-push-teams-1.png?fit=max&auto=format&n=dilvV2AX5QlHMhxA&q=85&s=493df95b2ab18de9048520c58aa30b5d" alt="img" width="1970" height="1146" data-path="images/okta_scim_steps/team_steps/step4-push-teams-1.png" />
   </Frame>

2. Change the Match result & push action to Link group. Then select the Statsig team you want to push to. It should follow the format `Statsig-ProjectName-TeamName-RoleName`.

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-kill-dead-node-pages/dilvV2AX5QlHMhxA/images/okta_scim_steps/team_steps/step4-push-teams-2.png?fit=max&auto=format&n=dilvV2AX5QlHMhxA&q=85&s=5a02fe8e26a40da87be00cea0af558c2" alt="img" width="1888" height="1458" data-path="images/okta_scim_steps/team_steps/step4-push-teams-2.png" />
</Frame>

3. When you are finished setting up the push, click "Save".

## Verify the Push

* Navigate to the Statsig Project and verify that the team has the new members.
* This could take some time for Okta to push the members to the team.

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-kill-dead-node-pages/dilvV2AX5QlHMhxA/images/okta_scim_steps/team_steps/step5-verify-push.png?fit=max&auto=format&n=dilvV2AX5QlHMhxA&q=85&s=936c6a8c87f1a3b7854397c2d8592473" alt="img" width="3266" height="1408" data-path="images/okta_scim_steps/team_steps/step5-verify-push.png" />
</Frame>

## Delete the Team

* On Okta, navigate to push groups and find the pushed group that maps to the Statsig team.
* Click the push status section and select "Unlink Group".

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-kill-dead-node-pages/dilvV2AX5QlHMhxA/images/okta_scim_steps/team_steps/step6-delete-1.png?fit=max&auto=format&n=dilvV2AX5QlHMhxA&q=85&s=282d81ba44f8f99a5123004aafc8f607" alt="img" width="1508" height="696" data-path="images/okta_scim_steps/team_steps/step6-delete-1.png" />
</Frame>

* When prompted to delete the group or leave it in the app, select "Delete".
* After Okta pushes the deletion, the team should be deleted from Statsig. This may take a few minutes to complete.

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-kill-dead-node-pages/dilvV2AX5QlHMhxA/images/okta_scim_steps/team_steps/step6-delete-2.png?fit=max&auto=format&n=dilvV2AX5QlHMhxA&q=85&s=af8583c121d3f0adbb7b457aa7919269" alt="img" width="1108" height="842" data-path="images/okta_scim_steps/team_steps/step6-delete-2.png" />
</Frame>

## Optional: Create a Team Via SCIM

* Find an existing Okta group with the members for a new Statsig Team.
* Navigate to Push Groups and Select "Push Groups".
* Select the group you want to push to Statsig.
* Change the Match result & push action to Create Group.
* The naming for this group must match the format `Statsig-ProjectName-TeamName-Member`.

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-kill-dead-node-pages/dilvV2AX5QlHMhxA/images/okta_scim_steps/team_steps/step7-create-1.png?fit=max&auto=format&n=dilvV2AX5QlHMhxA&q=85&s=2da2dad346c6772c4d9134690bb784ae" alt="img" width="1944" height="982" data-path="images/okta_scim_steps/team_steps/step7-create-1.png" />
</Frame>

* When you are finished setting up the push, click "Save".
* Afterwards, you should see the new team in the Statsig Project you specified.

<Frame>
  <img src="https://mintcdn.com/statsig-4b2ff144-kill-dead-node-pages/dilvV2AX5QlHMhxA/images/okta_scim_steps/team_steps/step7-create-2.png?fit=max&auto=format&n=dilvV2AX5QlHMhxA&q=85&s=c9f492f1fc27bbbfb816d7e6571b35b1" alt="img" width="3272" height="1742" data-path="images/okta_scim_steps/team_steps/step7-create-2.png" />
</Frame>
