# Advanced SCIM Provisioning

{% hint style="info" %}
To map roles and app access during SCIM provisioning, create custom attributes for the Luciq app in Okta.
{% endhint %}

### Update app provisioning

{% stepper %}
{% step %}

### Okta: Open provisioning settings

In Okta, go to **Applications → Luciq → Provisioning**.

Click **Edit**.
{% endstep %}

{% step %}

### Okta: Enable attribute updates

In Okta, in **Provisioning**, enable **Update User Attributes**.

<figure><img src="/files/STDOlSgtYTHe0ewyTCYP" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### Set up Luciq custom attributes

{% stepper %}
{% step %}

### Okta: Open the Luciq user profile

In Okta, go to **Directory → Profile Editor**.

Click **Luciq User**.

<figure><img src="/files/Cxy406x1BZ19upcSWjtv" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Okta: Add a custom attribute

In Okta, in **Luciq User**, click **+Add mappings**.
{% endstep %}

{% step %}

### Okta: Create the role attribute

In Okta, in **Luciq User**, use these values:

1. `Data type` = `string`
2. `Display name` = `Instabug Role`
3. `Variable name` = `instabugRole`
4. `External namespace` = `urn:ietf:params:scim:schemas:extension:instabug:2.0:User`
5. Enable **Enum**.
6. Add the Instabug roles.

{% hint style="info" %}
For the `Admin` role, use `adminstrator` as the value.
{% endhint %}

<figure><img src="/files/E7MGxDRDtI2qw8yuSwA4" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Okta: Create the application access attribute

In Okta, in **Luciq User**, use these values:

1. `Data type` = `string array`
2. `Display name` = `Instabug Applications`
3. `Variable name` = `instabugApplications`
4. `External namespace` = `urn:ietf:params:scim:schemas:extension:instabug:2.0:User`
5. Optional: Enable **Enum**.
6. Optional: Add your Luciq app names. Values must match exactly.

<figure><img src="/files/NvtpTjFbAzfBLMuCm5Cu" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### Configure attribute mapping

If you do not already have matching attributes on **Okta User**, create them first.

{% stepper %}
{% step %}

### Okta: Add an attribute to Okta User

In Okta, go to **Directory → Profile Editor → Okta User**.

Click **Add Attribute**.

<figure><img src="/files/iCnWK0cjmJmhFOS2M2eF" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Okta: Add Instabug Role

In Okta, in **Okta User**, use these values:

1. `Data type` = `string`
2. `Display name` = `Instabug Role`
3. `Variable name` = `instabugRole`
4. Enable **Enum**.
5. Add the Instabug roles.

<figure><img src="/files/hxYittruHchHXAeDlk2l" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Okta: Add Instabug Applications

In Okta, in **Okta User**, use these values:

1. `Data type` = `string array`
2. `Display name` = `Instabug Applications`
3. `Variable name` = `instabugApplications`
4. Enable **Enum**.
5. Add your Luciq app names. Values must match exactly.

<figure><img src="/files/7a6EcCESXGDwiTLMQq2a" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### Map Okta User to Luciq User

{% stepper %}
{% step %}

### Okta: Open Luciq mappings

In Okta, go to **Applications → Luciq**.

Click **Edit Mappings**.

<figure><img src="/files/PzjcOBUqIKiHbaihIrC9" alt=""><figcaption></figcaption></figure>

Choose **Okta User to Luciq**.
{% endstep %}

{% step %}

### Okta: Map the role attribute

In Okta, in **Okta User to Luciq**, select the **Okta User** attribute to map to Luciq.

From the dropdown, choose `InstabugRole`.

<figure><img src="/files/OHFJNMNrgUGfR4bZTgyi" alt=""><figcaption></figcaption></figure>

Your mapping should look like this.

<figure><img src="/files/sMQWdBOikcDRyAI3DG7u" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Okta: Repeat for `InstabugApplications`

Repeat the same mapping for `InstabugApplications`.
{% endstep %}
{% endstepper %}

***

### Assign roles and app access to users

{% stepper %}
{% step %}

### Okta: Start a new assignment

After setup, when you assign a new user for provisioning, Okta prompts you for role and app access.

These attributes are optional.
{% endstep %}

{% step %}

### Okta: Open user assignment

In Okta, go to **Applications → Luciq**.

Click **Assign → Assign to People**.
{% endstep %}

{% step %}

### Okta: Choose role and app access

In Okta, select a user, then click **Assign**.

Choose a role and app access from the dropdowns.

<figure><img src="/files/beUzMq931GDJphK4yTVM" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.luciq.ai/organization-settings/user-management/scim-provisioning/advanced-scim-provisioning.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
