For the complete documentation index, see llms.txt. This page is also available as Markdown.

Microsoft Entra ID privileged identity management (PIM)

To enforce just-in-time, least-privilege access to highly sensitive identity administration functions with Keycloak, privileged identity management (PIM) is strongly recommended.

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.

Prerequisites

Permissions required for registering and configuring an app in Microsoft Entra ID.

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.

Configure MS Entra ID as an IdP in Keycloak

  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. Select the tenant-admin group created previously.

  3. Remove all users from this group.

  4. 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 Manage → Groups.

  2. Select Discover groups.

  3. Search for the relevant internal group name.

  4. Select the group and select Manage Groups.

  5. Select OK to onboard the selected groups.

  6. Select the onboarded group.

  7. Expand Manage → Assignments.

  8. Select Add assignment.

  9. Select role Member.

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

  11. Set the assignment start and end dates.

  12. Select Assign.

Test the PIM

Test without PIM

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

  1. Sign 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

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

  1. In Activate just-in-time, select 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 select Activate.

  5. Sign 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.

Open

Last updated