Hello Yadhu Krishnan,
Here’s how you can troubleshoot and achieve the expected outcome:
Steps to Achieve the Desired Access Control
- Review Policy Exemption: Ensure that your policy exemption is applied correctly. The exemption should specifically target the security group with subscription-level contributors and not inadvertently include resource group-level contributors. You can verify this in the Azure Portal under the Policy section:
- Go to Policies → Assignments → [Your Policy] → Exemptions.
- Use Principal-Based Exemptions: As mentioned in the comment by Rukmini, you may need to recreate the exemption as a principal-based exemption. This approach allows you to specify the identities (users or groups) that should be exempt from the policy restrictions.
- Test Policy Effectiveness: After making changes to the exemption, ensure to test the policy to verify that resource group-level contributors are indeed restricted from creating the specified resources.
- Evaluate Role Assignment Rights: Ensure that the role assignments for the developers at the resource group level do not include permissions to override the policy you established. Check if the roles are appropriately assigned at the resource group level versus the subscription level.
- Use Management Groups or Higher Scope: If the policies continue to conflict, consider applying your restrictions at a higher scope, such as the management group or subscription level, which can better enforce resource creation limitations.
If you have any further query, please do let us know.