# Okta

Sync and manage PagerDuty users with Okta using SCIM user provisioning

## Configure the SCIM Integration in Okta

1. In Okta, add the [SCIM 2.0 Test App (Header Auth)](https://www.okta.com/integrations/scim-2-0-test-app-header-auth/) integration.
2. In the **Provisioning** tab, [configure the connection to PagerDuty’s API](https://help.okta.com/en-us/content/topics/provisioning/lcm/lcm-provision-application.htm) by entering the following:
   1. **Base URL**: `https://api.pagerduty.com/scim/v2`
   2. **API Token**: `Token token=<PagerDuty API KEY>`
3. Click **Test API Credentials** and ensure you get a successful response.
4. Click **Save**.

## Configure Provisioning

1. Ensure that [you’ve enabled](https://help.okta.com/en-us/content/topics/provisioning/lcm/lcm-provision-application.htm#:~:text=updates%20now.-,Configuration%20settings%20for%20To%20App%20provisioning,-This%20page%20contains) the **Create Users**, **Update User Attributes**, and **Deactivate Users** checkboxes.
2. Finally, configure any required mappings for the user. When creating attribute mappings use `urn:ietf:params:scim:schemas:core:2.0:User` for the external namespace:
   1. To create an attribute mapping for `roles`, use Okta’s instructions to [create an attribute](https://support.okta.com/help/s/article/How-to-Pass-Multivalued-Attributes-in-SCIM-User-Object?language=en_US): `roles.^[type=='base'].value`
   2. To create an attribute mapping for `entitlements`, use Okta’s instructions to [create an attribute](https://support.okta.com/help/s/article/How-to-Pass-Multivalued-Attributes-in-SCIM-User-Object?language=en_US):  `entitlements.^[type=='license'].value`
