> For the complete documentation index, see [llms.txt](https://docs.workflowgen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.workflowgen.com/tech/9.3/okta-integration/user-provisioning.md).

# User Provisioning

## Overview

The self-provisioning connector is a directory connector that automatically creates and synchronizes a user based on the user's session token claims that contain claims from the OpenID Connect provider ID token. This feature is only compatible with an OpenID Connect authentication.

## Prerequisites <a href="#prerequisites-user-provisioning" id="prerequisites-user-provisioning"></a>

* Make sure to have a working WorkflowGen instance.
* Make sure to know the instance's IP address or its fully qualified name.
* Make sure to know the address of the instance.
* Make sure to have configured Okta or one of the other OIDC-compliant authentication methods ([Microsoft Entra ID](https://docs.advantys.com/docs/azure/azure-active-directory-authentication), formerly Azure Active Directory; [AD FS](/tech/9.3/adfs-integration/authentication.md); [Auth0](/tech/9.3/auth0-integration/authentication.md); or [Microsoft Identity Platform v2.0](https://docs.advantys.com/docs/azure/azure-active-directory-authentication)).

## WorkflowGen configuration <a href="#workflowgen-configuration-user-provisioning" id="workflowgen-configuration-user-provisioning"></a>

This section will guide you through the WorkflowGen configurations necessary to set up the self-provisioning feature with a directory.

### Step 1: Create a self-provisioning directory

This directory will contain all of the users that are not provisioned elsewhere. To create a self-provisioning directory, do the following:

1. On the **Directories** page in the WorkflowGen Administration Module, click **New directory**.<br>
2. Fill in the form:
   * **Name**: `SELF_PROVISONING`(or something else)
   * **Description:** A good description of the directory
   * **Directory connector:** `Self-provisioning` <br>

     ![](https://content.gitbook.com/content/YVJQ3oC6tYNJaS1dqkor/blobs/iaqRQrQ78xbd3LwvMjM1/create-self-prov-dir-crop.png)<br>
3. Click **Save**.

### Step 2: Configure the user fields-to-claims mapping

Now that you've created a new directory with the self-provisioning connector, you need to define which claims are mapped to which WorkflowGen user field. To do this:

1. On the new directory's page, click **Edit mapping**.<br>

   ![](https://content.gitbook.com/content/YVJQ3oC6tYNJaS1dqkor/blobs/qh9b7at8XIiHoHdRzGF7/self-prov-dir-edit-mapping.png)<br>
2. To the right of the name of the WorkflowGen user field, enter the name of the claim in the session token that you want to map.<br>

   Here's an example of a session token generated by the `auth` node application from the Okta ID token connected with Google Apps:

   ```
    {
        "sub": "some.user@advantys.com",
        "iss": "https://<workflowgen_url>/auth",
        "aud": "https://<workflowgen_url>",
        "exp": 1535627127,
        "https://api.workflowgen.com/username": "some.user@advantys.com",
        "given_name": "Some",
        "family_name": "User",
        "nickname": "some-user",
        "name": "Some User",
        "picture":  "https://lh4.googleusercontent.com/path/to/photo.jpg",
        "gender": "male",
        "locale": "en",
        "updated_at": "1970-01-01T00:00:00Z",
        "email": "some.user@advantys.com",
        "email_verified": true,
        "nonce": "ffdd6d95-31e6-4466-84c4-43f8c0fbaae7",
        "iat": 1535591128
    }
   ```

   \
   These claims could be mapped in WorkflowGen like this:<br>

   ![](https://content.gitbook.com/content/YVJQ3oC6tYNJaS1dqkor/blobs/I6imnyDmFBTVQMk4IhZL/self-prov-example-mapping-crop.png)<br>

   ✏️ **Note:** The **Username** and **Name** fields are required.<br>
3. Click **Save**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.workflowgen.com/tech/9.3/okta-integration/user-provisioning.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
