I want to check the NSG list through API. But it says there's a problem with the authority.

stemsoft4 0 Reputation points
2023-09-19T07:58:06.4933333+00:00
  1. token requestUser's image
  2. nsg list requestUser's image
  3. responseUser's image

I don't know why this error occurs. Is the permission setting for calling NSG lists to API wrong?
Please tell me how to set it up in detail.please.


Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,645 questions
Azure Network Watcher
Azure Network Watcher
An Azure service that is used to monitor, diagnose, and gain insights into network performance and health.
159 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,559 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tushar Kumar 3,226 Reputation points MVP
    2023-09-19T08:13:22.52+00:00

    Hi stemsoft4,

    Authorization Error means that your AAD application/Service Principle is not having access to read the NSG resource.

    You need to assign atleast reader access to your AAD aplication to list the rules.

    User's image

    Please "Accept as answer" if this helps.

    0 comments No comments