Issues with API call to get Azure service tags - Service Tag Discovery API

Externo Euroairlines 0 Reputation points
2024-06-28T16:29:14.31+00:00

I am trying to execute API calls to get the Azure IP Ranges and Service Tags – Public Cloud (see link https://www.microsoft.com/en-us/download/details.aspx?id=56519).

I was able to setup an Azure account and created an app.

I created a Python script to make the calls to the API and obtain the service tags in json file by following the example in this MS link https://video2.skills-academy.com/en-us/rest/api/virtualnetwork/service-tags/list?view=rest-virtualnetwork-2023-11-01&tabs=Python

I am getting this error message

The client 'af27ba46-8111-4819-9af5-1499999999' with object id 'af27ba46-8111-4819-9af5-1XY999999' does not have authorization to perform action 'Microsoft.Network/locations/serviceTags/read' over scope '/subscriptions/68986aba-07e0-4494-98f2-999999999' or the scope is invalid. If access was recently granted, please refresh your credentials.
Code: AuthorizationFailed

I have been trying to grant access Microsoft.Network/locations/serviceTags/read to the App without success.

What is interesting to me is the client in the error message is not any code I can see in the App or the subscription.

What configuration am I missing?

Please help!

Azure Role-based access control
Azure Role-based access control
An Azure service that provides fine-grained access management for Azure resources, enabling you to grant users only the rights they need to perform their jobs.
706 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,279 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Marcin Policht 16,420 Reputation points MVP
    2024-06-28T16:43:20.12+00:00

    Make sure to:


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments