Why do new role assignments sometimes not work immediately?
AdvancedConceptEntra ID, RBAC and Identities
Answer
Two effects:
- Propagation: role assignments can take up to around 10 minutes to be enforced everywhere (longer for some data planes, and up to 30 minutes for management group scopes).
- Token caching: group membership is baked into tokens. A user added to a group needs a fresh token (
az logout+az login, oraz account get-access-tokenafter cache clear).
In IaC, a newly created identity may not be found yet (PrincipalNotFound). Setting principal_type = "ServicePrincipal" (Terraform skip_service_principal_aad_check = true) avoids the directory lookup that fails on replication lag.
More on Entra ID, RBAC and Identities
What is Microsoft Entra ID and how is it different from on-prem Active Directory?BeginnerWhat is the difference between an app registration and a service principal?BeginnerWhat is a managed identity and what problem does it solve?BeginnerSystem-assigned vs user-assigned managed identity: when do you use each?IntermediateHow does Azure RBAC evaluate access?IntermediateName the core built-in roles and the difference between Owner, Contributor and User Access Administrator.Beginner