You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In bicep, when deploying a Entra Group, and then immediately assigning RBAC permissions, the group cannot be found. The returned error explains this very issue, and suggests a fix. The CLI error when running a Deploy:
Principal <guid> does not exist in the directory <guid>. Check that you have the correct principal ID. If you are creating this principal and then immediately assigning a role, this error might be related to a replication delay. In this case, set the role assignment principalType property to a value, such as ServicePrincipal, User, or Group. See https://aka.ms/docs-principaltype (Code:PrincipalNotFound)
This makes sense, the group HAS just been created, however the suggested change to fix it, is already implemented.
From Googling it appears that other people who ran into this issue, fixed it, by setting the PrincipalType, but all of these have been for UAI and similar, it doesn't work for Groups. When running the code again, everything works as expected, assumingly since the group is now ready.
To Reproduce
Deploy a entra group using the graph bicep modules. Then assign an RBAC role immediately after.
The text was updated successfully, but these errors were encountered:
@DeeNaxic I don't think you're doing anything wrong here; RBAC assignments are known to be "eventually consistent" in some cases (i.e., the resource may not be immediately available for use when provisioning is complete). This is one of our main use cases for #1013
Bicep version
Build on an Azure Build Agent:
Describe the bug
In bicep, when deploying a Entra Group, and then immediately assigning RBAC permissions, the group cannot be found. The returned error explains this very issue, and suggests a fix. The CLI error when running a Deploy:
This makes sense, the group HAS just been created, however the suggested change to fix it, is already implemented.
From Googling it appears that other people who ran into this issue, fixed it, by setting the PrincipalType, but all of these have been for UAI and similar, it doesn't work for Groups. When running the code again, everything works as expected, assumingly since the group is now ready.
To Reproduce
Deploy a entra group using the graph bicep modules. Then assign an RBAC role immediately after.
The text was updated successfully, but these errors were encountered: