Hi @Frederik Kirkegaard this is not a bug but a known limitation with Azure role assignments and managed identities within Entra ID groups.
Managed identities are not treated as traditional user or service principal objects within Entra ID groups in the context of role-based access control (RBAC). When you assign a role to a group, it grants permissions to users and service principals that are directly members of that group. Managed identities, however, are a separate identity type.
Like you shared, the most reliable approach is to assign the necessary roles directly to the managed identities. This is the officially supported method.
A potential workaround is to continue assigning roles directly to the managed identities, as you mentioned. However, if you need to manage dynamic group memberships, you might consider using Azure Automation or Azure Functions to automate the role assignments. This way, you can maintain the dynamic nature of your groups while ensuring that the necessary roles are assigned directly to the managed identities.
Hope that helps.
Best,
Grace