# Manual SCIM integration with Okta

{% hint style="info" %}
You must be on a [Forest Admin Enterprise plan](https://www.forestadmin.com/pricing) to have access to this feature.
{% endhint %}

## Supported features

* Provisioning users from Okta to Forest Admin
* Updating user role, permission level, and tags from Okta to Forest Admin: Enabling SCIM will disable user editing from Forest Admin.
* Deleting user in Forest Admin when user is removed from Forest Admin app in Okta.
* Groups are used to assign users to team.

## Adding the Forest Admin app

Go to the Applications tab, then click "Browse App Catalog":

<figure><img src="https://85223878-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOx0Wo3NZjrQrGQthTy6o%2Fuploads%2Fgit-blob-7725d6fe684c2b645f8f0d37e073e1aec712872b%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

​​​Select "SCIMForest 2.0 Test App (Header Auth)"

<figure><img src="https://85223878-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOx0Wo3NZjrQrGQthTy6o%2Fuploads%2Fgit-blob-7e6036061da8c3f0328194f7bbb023f8c630366e%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Give your application a name. Keep in mind this app will be linked to one Forest Admin project. You may want to configure multiple apps if you want to activate SCIM provisioning on several projects.

## Authenticating Okta in Forest Admin

Go to your Forest Admin project settings and enable the User provisioning feature: this will automatically generate a **token** that you will need to paste into your Okta app:​

<figure><img src="https://85223878-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOx0Wo3NZjrQrGQthTy6o%2Fuploads%2Fgit-blob-0141362953bba69a6b005aeb8d876d528f5ff8a8%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Paste your token - prefixed by "Bearer" in the API Token field in the Integration tab:​​​​

{% hint style="danger" %}
If your token is "abc" then write "Bearer abc" in the API Token field
{% endhint %}

<figure><img src="https://85223878-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOx0Wo3NZjrQrGQthTy6o%2Fuploads%2Fgit-blob-71e341f69c152de7e459c61c071f9862453e3c9e%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://85223878-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOx0Wo3NZjrQrGQthTy6o%2Fuploads%2Fgit-blob-b6460e33696fdf2e169cbd032b46b3335834a007%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## Configuring the app

You may then proceed to configure your app:

{% hint style="warning" %}
The "Sync Password" field should be kept disabled, as we don't support it.
{% endhint %}

<figure><img src="https://85223878-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOx0Wo3NZjrQrGQthTy6o%2Fuploads%2Fgit-blob-2b8c042317de8504b28e273b684ffd77eb269195%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## Adding Forest Admin custom parameters

* permissionLevel (string): should match any of “Admin”, “Developer”, “Editor”, or “User”.
* teams (`string`): comma separated list of names exactly matching a team name in the project. ex: `"Operators,Support"`. This should either be filled in via a custom mapping rule or ignored if you are using Groups.
* role (`string`): should match exactly an existing role in the project.
* tags (optional `string`): key/value pairs, separated with a semicolon. ex: `"regions:France,Italie;job:developer"`

Go to Profile Editor and add attributes:

<figure><img src="https://85223878-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOx0Wo3NZjrQrGQthTy6o%2Fuploads%2Fgit-blob-7d086c0a89ffce81134c44b19b8cfbc61acababd%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The "External namespace" field should be filled with `urn:ietf:params:scim:schemas:extension:forest:2.0:User`
{% endhint %}

## Managing mapping rules

Create mapping rules to automatically provide values to mandatory parameters `role` and `permissionLevel`, and optionally `tags`. If you don’t create mapping rules, you will have to provide these values manually for each user provisioned.

{% hint style="warning" %}
Beware of selecting the right mapping direction: Okta to Forest Admin
{% endhint %}

<figure><img src="https://85223878-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOx0Wo3NZjrQrGQthTy6o%2Fuploads%2FjxPt9cP8cFsqk1pNhFxR%2Fimage.png?alt=media&#x26;token=ddef2ef2-f5f0-41f7-83e5-7216ef5a90f7" alt=""><figcaption></figcaption></figure>

## Adding custom user attributes

You may want to add custom user attributes to base your mapping rules on. To do so, go in the global user profile in Directory > profile editor.

<figure><img src="https://85223878-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOx0Wo3NZjrQrGQthTy6o%2Fuploads%2Fgit-blob-a8ab70f70691633b850e78c05a505579b9a168df%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## Managing teams with SCIM groups

Groups allow you to create mapping rules between Okta groups and Forest Admin teams.

First, go to the Directory tab and on the Groups section, ensure that you defined a group for each Forest Admin team.

<figure><img src="https://85223878-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOx0Wo3NZjrQrGQthTy6o%2Fuploads%2Fgit-blob-52a75b8eae078befb496824e03dd166680cc9a10%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Then go to the Forest Admin App in Okta and click on the "Push groups" tab.

<figure><img src="https://85223878-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOx0Wo3NZjrQrGQthTy6o%2Fuploads%2Fgit-blob-3685b0ec8a0601137f2076c166096070d0b12054%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Click on "Refresh App Groups" then "Push Groups" and select "Find groups by name". Type in the name of any group you want to link with a Forest Admin team.

![](https://85223878-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOx0Wo3NZjrQrGQthTy6o%2Fuploads%2Fgit-blob-595bf20750ef223500afe69f7bc46455b68c1590%2Fimage.png?alt=media) ![](https://85223878-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOx0Wo3NZjrQrGQthTy6o%2Fuploads%2Fgit-blob-4cfa31865eb7893d2f0ecdba5294850eed196df7%2Fimage.png?alt=media)

You can then map the Okta group with an existing Forest Admin team or create a new team with the same name.

{% hint style="warning" %}
Warning: when you link a group from Okta to a Forest Admin team, the Forest Admin team will be renamed to match the group name, unless you disable this option (see below).
{% endhint %}

<figure><img src="https://85223878-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOx0Wo3NZjrQrGQthTy6o%2Fuploads%2Fgit-blob-401b006d042290e686841922e5dac648750a7664%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

To prevent Okta from renaming your Forest Admin teams, you can disable groups renaming in the app settings.

![](https://85223878-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOx0Wo3NZjrQrGQthTy6o%2Fuploads%2Fgit-blob-d7ac2ae8d4423c8adee2a5fd1bf29348f37b43df%2Fimage.png?alt=media) ![](https://85223878-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOx0Wo3NZjrQrGQthTy6o%2Fuploads%2Fgit-blob-01bf648b7734b0c75cdc0bd9e918ac6aaee24297%2Fimage.png?alt=media)
