Create API management from Azurerm Terraform API

Erman Nghonda Tchinda 0 Reputation points
2025-05-01T18:49:12.56+00:00

│ Cannot register provider Microsoft.Web with Azure Resource Manager: resources.ProvidersClient#Register: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: Service returned an error. Status=403 Code="AuthorizationFailed" Message="The client 'b97bfe1d-76f8-4454-b109-61fcf93b0b94' with object id 'b97bfe1d-76f8-4454-b109-61fcf93b0b94' does not have authorization to perform action 'Microsoft.Web/register/action' over scope '/subscriptions/c52ebc8b-e04a-460e-82e0-324373aed357' or the scope is invalid. If access was recently granted, please refresh your credentials.".

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,385 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Shireesha Eeraboina 2,825 Reputation points Microsoft External Staff
    2025-05-02T07:12:42.8866667+00:00

    Hi Erman Nghonda Tchinda,

    The error message indicates that the client does not have the necessary permissions to register the Microsoft.Web provider. You need to ensure that the service principal has the appropriate role assigned to perform the action 'Microsoft.Web/register/action' on the specified subscription. If access was recently granted, refreshing your credentials may also help.

    Here are the steps you can take to address this authorization error:

    • Verify that the client 'b97bfe1d-76f8-4454-b109-61fcf93b0b94' has the required permissions to register the Microsoft.Web provider and perform the specified action.
    • If the client does not have the necessary permissions, you need to grant the required permissions to the client. This can be done through Azure Role-Based Access Control (RBAC) by assigning the appropriate role to the client at the subscription level or resource group level.
    • Ensure that the client has the 'Microsoft.Web/register/action' permission over the scope '/subscriptions/c52ebc8b-e04a-460e-82e0-324373aed357'.

    This can help ensure that the client's credentials are up to date and reflect the latest permissions granted.

    For your reference, please review the following documentations for further clarification:

    https://learn.microsoft.com/en-us/azure/api-management/quickstart-terraform?tabs=azure-clihttps://learn.microsoft.com/en-us/azure/developer/terraform/troubleshoot#unable-to-list-provider-registration-status

    By following these steps and ensuring that the client has the necessary permissions and access rights, you should be able to create API management from Azurerm Terraform API without encountering the authorization error.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.