---
title: PIM endpoints in Microsoft Graph return 400 AadPremiumLicenseRequired on a tenant without Entra ID P2 – not 403
short-title: PIM via Graph without P2
summary: "On a tenant without Microsoft Entra ID P2, `roleEligibilitySchedules` and `roleManagementPolicies` answer `400 AadPremiumLicenseRequired` even when the delegated read scopes are consented, while `roleAssignments` still returns 200 – treat it as 'the tenant has no PIM', not as a read error or a missing consent"
tags: [graph, pim, entra-id, licensing, error-handling]
applies-to: Microsoft Graph v1.0, Microsoft Entra ID
last-reviewed: 2026-11-29
---

# PIM via Graph on a tenant without Entra ID P2

> **Bottom line.** If your app reads Privileged Identity Management data, expect `400` with code `AadPremiumLicenseRequired` on tenants without a PIM license (Entra ID P2 or Entra ID Governance) – even after the admin consented to the read scopes. It is not `403`, so code that maps "4xx = no permission" shows the wrong message. Treat it as "this tenant has no PIM" and show that as a state.
>
> **Ve zkratce.** Bez licence pro PIM (Entra ID P2 nebo Entra ID Governance) vrací PIM endpointy v Graphu `400 AadPremiumLicenseRequired`, ne 403 – i se schválenými scopy. Čti to jako „tenant PIM nemá“, ne jako chybu čtení nebo chybějící souhlas.

## What was measured

Delegated Microsoft Graph from an SPFx app, signed in as a global admin on a tenant without Entra ID P2 (November 2026). The token `scp` claim contained `RoleManagement.Read.Directory`, `RoleEligibilitySchedule.Read.Directory` and `RoleManagementPolicy.Read.Directory`.

| Request | Result |
|---|---|
| `GET /roleManagement/directory/roleAssignments?$top=1` | `200` – permanent role assignments are readable without P2 |
| `GET /roleManagement/directory/roleEligibilitySchedules?$top=1` | `400 AadPremiumLicenseRequired` |
| `GET /policies/roleManagementPolicies?$filter=scopeId eq '/' and scopeType eq 'Directory'` | `400 AadPremiumLicenseRequired` |

## What it means for an app

- Classify by the error **code**, not only the status: `AadPremiumLicenseRequired` → "PIM not available on this tenant (needs Entra ID P2 or Entra ID Governance)"; `403` / `Authorization_RequestDenied` → missing consent or role.
- Consent alone tells you nothing about licensing: the scopes can be granted and visible in the token while the endpoints still refuse.
- Cover the classification with a unit test that uses the real error body – a tenant with P2 will never take this path, and one without P2 will never take the other.

## Sources

- Measured live in a production tenant, November 2026 (table above).
- Microsoft Learn, [Microsoft Entra ID Governance licensing fundamentals – Privileged Identity Management](https://learn.microsoft.com/entra/id-governance/licensing-fundamentals#privileged-identity-management): PIM needs Entra ID P2 or Entra ID Governance; permanent role assignments are unaffected without the license.
- Microsoft Learn, [Troubleshoot Authorization_RequestDenied error with Microsoft Graph](https://learn.microsoft.com/troubleshoot/entra/entra-id/app-integration/troubleshoot-authorization-requestdenied-graph-api): `Authorization_RequestDenied` means the user or app lacks permissions.

## Not measured

- The exact response on a tenant with P2 but no PIM role configured.
- Whether `roleAssignmentSchedules` behaves like `roleEligibilitySchedules`.
