MS Entra ID Privileged Identity Management (PIM)

chevron-rightPermissions required for registering and configuring an app in Microsoft Entra ID.hashtag

The account must have permission to manage applications in Microsoft Entra ID. Ideally the account should be in the Global Admin role to grant admin consent.

To enforce just-in-time, least-privilege access to highly sensitive identity administration functions with Keycloak, Privileged Identity Management (PIM) is required. Keycloak is a tier-0 system; standing administrative access significantly increases blast radius and insider-risk. PIM ensures access is time-bound, auditable, and aligned with governance and compliance requirements without changing the authentication flow.

Configure MS Entra ID as an IdP in Keylcoak

  1. To continue, it is expected that either the OIDC or SAML SSO has been completed:

  1. Ensure Assignment required is enabled on the MS Entra application created above.

  2. Prepare the admin group by selecting the tenant-admin group created previously in the OIDC or SAML article and remove all users from this group.

  3. Assign the group to the application.

    1. If you had used application roles, use the relevant guide to assign the tenant-admin group to the tenant-admin application role.

    2. If you had used groups directly, use the guide to assign the tenant-admin group directly to the application.

Configure PIM in MS Entra ID

  1. Expand ManageGroups.

  2. Click Discover groups.

  3. Search for the relevant internal group name.

  4. Select the group and click Manage Groups.

  5. Click OK to onboard the selected groups.

  6. Select the onboarded group.

  7. Expand ManageAssignments.

  8. Click Add assignment.

  9. Select role Member.

  10. Click Select member(s), add users, then click Next.

  11. Set the assignment start and end dates.

  12. Click Assign.

Test the PIM

Test without PIM

circle-info

User must have permission to sign in to the MS Entra application.

  1. Log in to Spark.

  2. Verify you do not have tenant-admin permissions and your membership is user:pf only.

  3. Sign out.

Test with PIM

circle-info

User must have eligibility configured as part of Configure PIM in MS Entra ID.

  1. In Activate just-in-time, click Activate.

  2. Select Groups in the left pane.

  3. Under Eligible assignments, activate your group

  4. Select duration and provide a reason if required, then click Activate.

  5. Log in to Spark.

  6. Verify you have tenant-admin permissions and memberships user:pf and tenant-admin .

Demo video

This short video demonstrates the use of PIM for privileged access into a Spark tenant.

Last updated