An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
@Anonymous , thank you for the question.
I am not sure if MOSP account could be the cause for this issue. I would suggest checking the following and see if it helps:
- Ensure that
Microsoft.PolicyInsightsresource provider is registered for the subscription where you are getting the error. To do it, go to "Subscription" in portal --> Select your subscription (if you have many) --> Select "Resource Provider" from the resource menu of this subscription.
Here, search for "Microsoft.PolicyInsights" and make sure that it is registered (if not, register it using the "Register" button:
- Ensure that you have atleast "Resource Policy Contributor" role at subscription level. If that does not help, try to assign the policy again using the "Contributor" role at subscription level to check if the assignments are getting blocked due to incorrect role assignment.
If you still face this issue, please review "activity logs" from "Azure Monitor" --> "Activity log". There may be a delay of couple of minutes before these logs are visible here related to the assignment operation. The Activity logs should contain additional information for the reason of failure (check the JSON view in logs for details).
Hope this helps.
If the answer did not help, please share any additional information that you get from activity logs. If there is no additional information available in the activity log, you might have to reach out to "Azure Support" to create a support ticket so that it can be investigated from the backend too.
If the answer helped, please click Accept answer so that it can help others in the community looking for help on similar topics.