> For the complete documentation index, see [llms.txt](https://docs.elimity.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elimity.com/ms-entra-pim-roles/step-by-step-deployment-guide.md).

# Step-by-step deployment guide

### Microsoft Entra PIM Roles

The Microsoft Entra PIM Roles connector for Elimity Insights fetches Privileged Identity Management role data — role definitions, active assignments, and eligible (not-yet-activated) assignments — from Microsoft Entra ID, so you can keep control over privileged access in your environment. Follow the instructions below to set up the connector.

#### 1. Which data is imported

The following entity types are imported:

* **Principals** — the users, groups, and service principals that hold or are eligible for a role
* **Roles** — Entra directory role definitions (e.g. Global Administrator, User Administrator)
* **Role Assignment Schedule Instances** — *active* PIM role assignments
* **Role Eligibility Schedule Instances** — *eligible* (not-yet-activated) PIM role assignments

Rather than linking principals to roles directly, each PIM grant is modelled as its own entity (the *schedule instance*). A single principal-role pair can carry state a plain link can't hold — the scope it applies to, its start/end window, how it was granted (direct, inherited, or via a group), and whether it's active or merely eligible. Each instance sits between a Principal and a Role and carries that context as attributes, letting Elimity model just-in-time and time-bound access as a standard identity graph.

{% code overflow="wrap" %}

```mermaid
graph TD;Principal[Principal]; Role[Role]; Assignment[Role Assignment Schedule Instance]; Eligibility[Role Eligibility Schedule Instance];Principal --> Assignment; Principal --> Eligibility; Assignment --> Role; Eligibility --> Role;
```

{% endcode %}

Attributes imported per entity type:

**Principal** — Type (User, Group, or Service Principal)

**Role** — Description, Is built-in, Template ID

**Role Assignment Schedule Instance / Role Eligibility Schedule Instance** (identical) — Principal name, Role, Type, Membership (Direct/Inherited/Group), Scope ID, Scope name, Scope type (tenant / administrativeUnit / application / other), Start time, End time, Status

#### 2. Creating a dedicated app registration in Entra ID

As usual we recommend creating a dedicated account for this connector. Follow the steps below to set up a new app registration in Entra ID:

1. In Azure, open your tenant's app registrations by typing 'app registrations' in the global search bar and clicking the **App registrations** service.
2. Click the **New registration** button.
3. Choose a name for this registration (e.g. `elimity-insights-pim-roles`).
4. Leave the defaults for 'Supported account types' and 'Redirect URI' and click **Register**.

Note down both the **client identifier** and the **tenant identifier** for this new app registration.

#### 3. Generating credentials for the new app registration

The connector authenticates as the app registration using a client secret. Click **Certificates & secrets** in the menu on the left and add a new client secret. Immediately note down the **value** of your new secret (Entra shows it only once).

#### 4. Granting read permissions to the Graph API

Grant the app registration read access to the required parts of the Microsoft Graph API:

1. Click **API permissions** in the menu on the left and add **Microsoft Graph → Application permissions**:
   * `RoleManagement.Read.Directory` — read role definitions, assignments, and eligibilities
2. Grant admin consent for these permission assignments.

#### 5. Creating a source in Elimity Insights

1. Go to **Sources** in the left navigation bar and click **Add Source**.
2. Search for **Custom** and click **Set Up**.
3. Click **Set Up** again and give the source a name (e.g. `Microsoft Entra PIM Roles`).
4. Select **Upload export file**, click **Continue**, and upload the data model file: `data-model-export.json`.
5. Open the **Config** tab and click **Edit**.
6. Set **Enable automatic imports via custom gateway** to `true` and fill in the **Gateway URL**: [`https://pim-entra-roles-gateway-1027270379075.europe-west1.run.app`](https://pim-entra-roles-gateway-1027270379075.europe-west1.run.app).
7. Click **Add configuration value** and add the entries below.
8. Click **Save and run** to launch your first import. Monitor progress in the **Logs** tab (counts are logged per stage — role definitions, active assignments, eligible assignments, principals emitted); the **Imports** tab shows the summary for each run.

{% file src="/files/u0cJbXu0g3WiRYRBsMvP" %}

| Configuration option | Key                  | Description                                   |
| -------------------- | -------------------- | --------------------------------------------- |
| Tenant ID            | `Tenant ID`          | Tenant identifier you noted down in step 2.   |
| Application ID       | `Application ID`     | Client identifier you noted down in step 2.   |
| Application Secret   | `Application Secret` | Client secret value you noted down in step 3. |

***

<br>


---

# 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.elimity.com/ms-entra-pim-roles/step-by-step-deployment-guide.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.
