Source: https://support.atomicwork.com/product/identity-access-management/access-management/provisioning-methods-for-entitlements

# Provisioning methods for entitlements

Every entitlement has a **provisioning action** (how access is granted) and a **de-provisioning action** (how access is revoked). When an employee's access request is approved, the **AccessOps Manager** Coworker carries out the provisioning action you set here.

Not every app has an identity provider (IdP) group behind it. Besides IdP groups, you can grant and revoke access by running a script from your Code library, or by assigning the access request to a group, an agent or the workspace queue.

You pick the method from three tabs:

| Tab                  | Methods                                                                                                      | Use it when                                                            |
| -------------------- | ------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------- |
| **Add to IdP group** | **Add to Okta group**, **Add to Entra group**, **Add to JumpCloud group**, **Add to Google Workspace group** | The app's access is managed through an IdP group.                      |
| **Custom action**    | **Run code script**                                                                                          | The app has an API but no IdP group. A published script calls the API. |
| **Assign ticket**    | **Assign to group**, **Assign to agent**, **Workspace queue**                                                | A team, a person or the workspace's queue should fulfill the request.  |

## Before you begin

- **Permissions:** You need permission to manage applications (**Settings > Access management > Applications**).
- **AccessOps Manager:** The **AccessOps Manager** Coworker must be published. See [Setting up agentic access provisioning](/product/identity-access-management/access-management/setting-up-agentic-access-provisioning).
- **For Run code script:** The script must be **published** in the Code library. See [Code library](/product/ai-workforce/code-library).
- **For Assign ticket:** The group or agent must be in the workspace you pick.

## Open an entitlement's provisioning settings

1. Go to **Settings > Access management > Applications** and open an app from the **Managed** tab.
2. Open the **Entitlements** tab and click an entitlement. To create one, click **Add**.
3. In the **Edit entitlement** dialog, fill in **Basic details**, then go to **Provisioning**.
4. Under **Provisioning action**, open **Method**. Pick a tab, then pick a method. You can also search.

## Grant access with a code script

Use this for apps you can reach through an API but that have no IdP group, such as internal tools or SaaS apps without a connector.

1. **Choose Run code script**

   On the **Custom action** tab, pick **Run code script** ("Grant access by running a published code script.").

   ![Custom action tab in the Method picker, showing Run code script](assets/iga-provisioning-01-custom-action-tab.png)
2. **Pick the script**

   Under **Code script**, pick a published script from your Code library.
3. **Choose how access is revoked**

   Leave **De-provisioning action is same as the provisioning action** selected to revoke with the same script, or clear it to choose another method. See [Set a separate revoke method](#set-a-separate-revoke-method).
4. **Collect information (optional)**

   Under **Collect information (optional)**, click **Add a question** for anything the requester needs to tell you, such as a team name or a license tier.
5. **Save**

   Click **Save**.

   ![Run code script with a script selected and the de-provisioning checkbox selected](assets/iga-provisioning-02-run-code-script-configured.png)

> [!NOTE]
>
> If you keep **De-provisioning action is same as the provisioning action** selected, write the script so it handles revoking as well as granting. Atomicwork doesn't undo a script's changes on its own.

The script gets the user, the operation (grant or revoke) and the request in `input.iga_context`. See [Writing code scripts for access provisioning](/product/identity-access-management/access-management/writing-code-scripts-for-access-provisioning) for what it holds, an example script, and how to test it.

To keep secrets out of your script, see [Use saved credentials in code](/product/enterprise-workflows/connect-to-other-systems/use-saved-credentials-in-code).

## Grant access by assigning the access request

Use this when a team or a person should do the provisioning.

1. **Choose a method**

   On the **Assign ticket** tab, pick one:
   - **Assign to group**: "Assign the access request to a group for fulfillment."
   - **Assign to agent**: "Assign the access request to an agent for fulfillment." Only human agents are listed. AI Coworkers can't be picked here.
   - **Workspace queue**: "Assign the access request to the workspace queue."
   ![Assign ticket tab in the Method picker, showing Assign to group and Assign to agent](assets/iga-provisioning-03-assign-ticket-tab.png)
2. **Pick the workspace and target**

   Pick the **Workspace**, then the **Group** or agent in that workspace.
3. **Choose how access is revoked, then save**

   Set the de-provisioning action, add any **Collect information (optional)** questions and click **Save**.

   ![Assign to group for provisioning and de-provisioning, each with a workspace and group](assets/iga-provisioning-04-assign-to-group-configured.png)

When a request for the entitlement is approved, the access request is assigned to the group or agent you picked so they can fulfill it.

## Set a separate revoke method

Clear **De-provisioning action is same as the provisioning action**. A **De-provisioning action** section appears with the same choices:

- **Remove from IdP group**
- **Custom action**: **Run code script** ("Revoke access by running a published code script.")
- **Assign ticket**: **Assign to group** or **Assign to agent**, which assign the revocation request

For example, you can grant access with a script and remove it from an Entra group.

![Separate De-provisioning action: grant with a code script, revoke by removing from an Entra group](assets/iga-provisioning-05-separate-deprovisioning-action.png)

## Set methods with Service Assist

You can also ask **Service Assist** to set how an existing entitlement is granted or revoked. It can set **Run code script**, **Assign to group** and **Assign to agent**, and asks you to confirm before it makes the change. To use an IdP group, set it in the entitlement dialog. See [Service Assist](/product/ai-knowledge/ai-assist).

## Good to know

- **Existing entitlements keep working.** Entitlements set up before these methods were added keep their current configuration.
- **Pending requests use the current method.** If you change an entitlement's method, requests still waiting to be fulfilled use the new one.

## Related articles

- [Setting up agentic access provisioning](/product/identity-access-management/access-management/setting-up-agentic-access-provisioning)
- [Writing code scripts for access provisioning](/product/identity-access-management/access-management/writing-code-scripts-for-access-provisioning)
- [Just-in-Time access management](/product/identity-access-management/access-management/just-in-time-access-management)
- [Provisioning access with custom workflows](/product/identity-access-management/access-management/provisioning-access-with-custom-workflows)
- [Code library](/product/ai-workforce/code-library)
- [Execute code action](/product/enterprise-workflows/legacy-workflows/execute-code-action)
