> For the complete documentation index, see [llms.txt](https://docs.balkan.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.balkan.id/playbooks/playbooks/automated-joiner-mover-leaver-playbook-with-adp-and-entraid.md).

# Automated Joiner-Mover-Leaver Playbook with ADP and EntraID

### Overview

This document provides a step-by-step, walkthrough for configuring and using Joiner–Mover–Leaver (JML) Playbooks in BalkanID. It covers the complete setup flow from integrating your HRIS and Microsoft Entra ID, to configuring webhooks with HRIS and n8n, and finally executing playbook actions that automatically create, route, and approve access requests based on defined policies.

While this guide is specific to ADP and EntraID, the same concepts apply to other HR systems and applications for which provisioning & de-provisioning are supported by BalkanID.

### What Are JML Playbooks?

JML Playbooks in BalkanID allow you to automate identity and access workflows triggered by employee lifecycle events such as:

* **Joiner**: A new employee starts
* **Mover**: An employee changes role, department, or title
* **Leaver**: An employee exits the organization

Playbooks can automatically:

* Create access requests
* Route requests for approval or auto-approval based on policy
* Trigger provisioning and deprovisioning workflows
* Maintain a complete audit trail within your BalkanID tenant

Playbooks can be triggered in real time via webhooks or run automatically based on defined conditions, providing consistency, speed, and governance across identity workflows.

### Pre-requisites

Before you begin, ensure the following are in place:

* An active BalkanID tenant accessible at `https://<yourdomain>.balkanid.app`
* Administrator access in ADP (or your HRIS) to configure API keys and webhooks
* Global Administrator access in Microsoft Entra ID for integration setup
* An active n8n instance (cloud-hosted or self-hosted)

> This guide uses n8n-based workflows as an example, BalkanID playbooks supports multiple workflows. If you use a different workflow orchestration platform or custom scripts, please contact BalkanID Support: <support@balkan.id>

### Integration Setup

#### 1. Configure HRIS - ADP Integration

1. Log in to `<yourdomain>.balkanid.app`
2. Navigate to Configure → Integrations
3. Click Add Integration<br>

   <figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FOmmT5gK5i2iF4Gflr5Bu%2Fimage.png?alt=media&#x26;token=5187e089-7408-439c-a86b-c358d1668f36" alt=""><figcaption></figcaption></figure>
4. Search for and select 'Merge'
5. Provide a description and assign an owner<br>

   <figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FwBpBA4MIOrv9UL3db9xE%2Fimage.png?alt=media&#x26;token=9a595f15-85ab-4d49-b4a8-f16481e4bd12" alt=""><figcaption></figcaption></figure>
6. Click on 'Get Access Token'
7. Search for 'ADP' and select the ADP module
8. Complete the setup using either:
   * API Key authentication
9. Click on next to move onto *Optional Configuration.*
   1. Fill Optional configuration, if required.

      <figure><img src="https://docs.balkan.id/~gitbook/image?url=https%3A%2F%2F2975852473-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FbVGYwk8aSk5yI1GDPEW9%252Fuploads%252FvgCgyt5C48JaG9QxevOS%252Fimage.png%3Falt%3Dmedia%26token%3D84c48d74-f15d-4ccf-816f-eb7e5433b467&#x26;width=768&#x26;dpr=3&#x26;quality=100&#x26;sign=5d536fed&#x26;sv=2" alt=""><figcaption></figcaption></figure>
   2. Once you filled in the information, click Save. Your integration is now configured and you will see the status of the integration displayed alongside other integrations on the *Integrations* page. When data is available, the integration Status will read Connected and the integration Message will read Data available.

#### 2. Configure Microsoft Entra ID Integration

BalkanID recommends using a **dedicated service account** for Entra ID integrations instead of a personal user account.

Follow the official setup guide here:

* [Microsoft Entra ID Integration Setup](https://docs.balkan.id/getting-started/setting-up-your-tenant/application-integrations/direct-application-integration/microsoft-azure-and-entra-id-integration-setup)

This integration enables BalkanID to evaluate identity attributes, roles, and group memberships required for access decisions.

### Webhook Configuration: ADP↔ n8n

### n8n Playbook Setup

1. Download the playbook JSON file provided by the BalkanID team. If you have not yet received the file, please contact <support@balkan.id> to request it.
2. Import the workflow into your n8n instance
3. Configure credentials:

   * Create a new BalkanID API Key from `<yourdomain>.balkanid.app → Account → API Keys`\
     and use it in playbook configuration

   <figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FIYIU1kNMPu4sFtPqAJ7Y%2Fimage.png?alt=media&#x26;token=2aa44574-4328-40f5-a3cc-f210f81ee147" alt=""><figcaption></figcaption></figure>

   * ADP credential using the API key created in the next step
4. Initialize configuration variables in the workflow nodes
5. Activate the workflow

Once active, the n8n workflow listens for HRIS events and triggers the appropriate BalkanID playbook.

### ADP API and Workflow/Webhook setup

To enable real-time JML automation, ADP events must be forwarded to n8n using webhooks.

#### Step 1: Create an ADP API Key

Inside your ADP app: Credentials

Generate:

* Client ID
* Client Secret
* Token URL
* Scopes for user/profile access and

Save the details securely

#### Step 2: Create ADP Webhooks

Inside the application configuration, navigate ti 'App Settings' --> 'Event Notification' and click 'Add Event Subscription'.

Create webhooks and use the target URL (example: `https://balkanid.app.n8n.cloud/webhook/<webhook-id>`) , ADP publishes lifecycle events for worker changes , add them to the subscription.

| JML Event | ADP Event                |
| --------- | ------------------------ |
| Joiner    | worker.hire              |
| Mover     | worker.assignment.change |
| Leaver    | worker.termination       |

Reference Links:

[https://developers.adp.com/getting-started/key-concepts/adp-event-apis-and-event-notification-guide](https://developers.adp.com/getting-started/key-concepts/adp-event-apis-and-event-notification-guide?utm_source=chatgpt.com)

[https://developers.adp.com/apis/api-explorer/hcm-offrg-wfn/hcm-offrg-wfn-hr-workers-v2-workers](https://developers.adp.com/apis/api-explorer/hcm-offrg-wfn/hcm-offrg-wfn-hr-workers-v2-workers?utm_source=chatgpt.com)

[https://marketplace-cdn.adp.com/dev-portal/pdf/protected/Worker\_Hire\_Event\_API\_Guide\_for\_ADP\_Workforce\_Now](https://marketplace-cdn.adp.com/dev-portal/pdf/protected/Worker_Hire_Event_API_Guide_for_ADP_Workforce_Now?utm_source=chatgpt.com)<br>

### Playbooks in Action

#### Joiner Playbook Flow

The Joiner playbook automates identity creation and access provisioning when a new employee joins the organization.<br>

<figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2Fy5ESYtuMOfdWEldOCkYv%2Fimage.png?alt=media&#x26;token=cb14f0f3-de7d-43c8-8896-f8d07ee9e9f2" alt="" width="375"><figcaption></figcaption></figure>

1. A new employee record is created in ADP
2. A Webhook or scheduled sync sends the event to BalkanID
3. The Joiner playbook is triggered
4. A user account is created in Entra ID on the employee’s start date
5. The playbook:
   * Applies preferred email formats
   * Detects and resolves name or email conflicts
6. Birthright access is determined using peer analysis based on attributes such as:
   * Job title
   * Department
   * Manager
   * Employment type
7. BalkanID generates access grant requests
8. Requests are:
   * Auto-approved via policies(see how to create policies [here](https://docs.balkan.id/~/revisions/mC3o0sGSsz3AIawh8Hk1/lifecycle-management/policies), or
   * Manually approved by designated approvers
9. Approved access is provisioned in Entra ID
10. The newly created corporate email address is written back to ADP
11. Login credentials are securely shared with the employee’s manager

#### Leaver Playbook Flow

The Leaver playbook ensures timely deprovisioning when an employee is terminated.<br>

<figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FMb2suBLKzzE39veaR2Tb%2Fimage.png?alt=media&#x26;token=1744936a-bf4f-45f3-ba00-27f7ba7c1c2b" alt="" width="375"><figcaption></figcaption></figure>

1. An employee is marked as terminated in ADP
2. The termination event is sent to BalkanID Leaver playbook and is triggered
3. BalkanID generates access revoke requests
4. Requests are:

Auto-approved through [policy](https://docs.balkan.id/~/revisions/mC3o0sGSsz3AIawh8Hk1/lifecycle-management/policies), or

Routed for manual approval

5. Upon approval, the user is suspended in Entra ID, preventing further access

#### Mover Playbook Flow

The Mover playbook manages access changes when an employee’s attributes change.<br>

<figure><img src="https://2975852473-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVGYwk8aSk5yI1GDPEW9%2Fuploads%2FZi3qrmKVyqKSmrzU5382%2Fimage.png?alt=media&#x26;token=889804f6-ecf3-4a90-a28c-de8a6110b4b8" alt="" width="375"><figcaption></figcaption></figure>

1. An employee’s attributes (job title, department, manager, employment type, etc.) are updated in ADP
2. The change is detected and the Mover playbook is triggered
3. BalkanID recalculates the employee’s required access
4. Access grant and revoke requests are generated
5. Requests are:

Auto-approved using [policies](https://docs.balkan.id/~/revisions/mC3o0sGSsz3AIawh8Hk1/lifecycle-management/policies), or

Sent for manual approval

6. Approved changes are provisioned in Entra ID


---

# 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 dynamically by asking a question.

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

```
GET https://docs.balkan.id/playbooks/playbooks/automated-joiner-mover-leaver-playbook-with-adp-and-entraid.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
