Error in create azure connections due to Azure Subscription and Credentials consumption

Kevin Baumgartner 0 Reputation points
2024-07-11T22:54:30.3266667+00:00

Trying to create Azure Connection form Equinix Port Using Terratest and got below error

Received unexpected error: FatalError{Underlying: error while running command: exit status 1; ╷ │ Error: checking for presence of existing resource group: resources.GroupsClient#Get: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: Service returned an error. Status=403 Code="AuthorizationFailed" Message="The client '49eec351-b921-4cba-a977-5528d3bd3e21' with object id '49eec351-b921-4cba-a977-5528d3bd3e21' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/read' over scope '/subscriptions/c1adf229-1d7b-475c-8322-b67dd1884dc6/resourcegroups/Panthers_Test' or the scope is invalid. If access was recently granted, please refresh your credentials."

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,236 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Givary-MSFT 33,391 Reputation points Microsoft Employee
    2024-07-12T08:24:36.9033333+00:00

    @Kevin Baumgartner Thank you for reaching out to us, was this working before or new setup?

    The error message indicates that the client with the object ID '49eec351-b921-4cba-a977-5528d3bd3e21' does not have authorization to perform the 'Microsoft.Resources/subscriptions/resourcegroups/read' action over the '/subscriptions/c1adf229-1d7b-475c-8322-b67dd1884dc6/resourcegroups/Panthers_Test' scope.

    Ensure that the client has the appropriate permissions to perform the 'Microsoft.Resources/subscriptions/resourcegroups/read' action over the specified scope.

    Check the permissions for the above mentioned id/selecting the subscription that contains the resource group, and then selecting the Access control (IAM) option/validate the permissions which are present or required.

    Ensure that the client has the appropriate permissions, you should be able to perform the 'Microsoft.Resources/subscriptions/resourcegroups/read' action over the specified scope without encountering the 'AuthorizationFailed' error.

    Let me know if you have any questions, feel free to post back.

    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.