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
Configure MS Entra ID as an IdP in Keycloak
To continue, it is expected that either the OIDC or SAML SSO has been completed:
Ensure Assignment required is enabled on the MS Entra application created above.
Select the
tenant-admingroup created previously.Remove all users from this group.
Assign the group to the application.
If you had used application roles, use the relevant guide to assign the
tenant-admingroup to thetenant-adminapplication role.If you had used groups directly, use the guide to assign the
tenant-admingroup directly to the application.
Configure PIM in MS Entra ID
Expand Manage → Groups.
Select Discover groups.
Search for the relevant internal group name.
Select the group and select Manage Groups.
Select OK to onboard the selected groups.
Navigate to Privileged Identity Management | Groups.
Select the onboarded group.
Expand Manage → Assignments.
Select Add assignment.
Select role Member.
Select Select member(s), add users, then select Next.
Set the assignment start and end dates.
Select Assign.
Test the PIM
Test without PIM
Sign in to Spark.
Verify you do not have
tenant-adminpermissions and your membership isuser:pfonly.Sign out.
Test with PIM
In Activate just-in-time, select Activate.
Select Groups in the left pane.
Under Eligible assignments, activate your group
Select duration and provide a reason if required, then select Activate.
Sign in to Spark.
Verify you have
tenant-adminpermissions and membershipsuser:pfandtenant-admin.
Demo video
This short video demonstrates the use of PIM for privileged access into a Spark tenant.
Last updated
