How to fix error - scope is invalid (AZURE)

Zeeshan 5 Reputation points
2023-02-14T08:41:55.62+00:00

I have 2 Apps in my Azure Active directory, one is connecting a (security) platform successfully but the other is giving me error in connection. Both have exactly same permissions. Error is " The client '6811588b-....-4156-8...-....aefc5111' with object id '6811588b-....-4156-8...-....aefc5111' does not have authorization to perform action 'Microsoft.Network/networkSecurityGroups/read' over scope '/subscriptions/7b5e21ae-....-4cb0-....-....b91da70d' or the scope is invalid. If access was recently granted, please refresh your credentials.

Why am I getting this error and how can I resolve this issue? Any advise will be appreciated.

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
{count} votes

1 answer

Sort by: Most helpful
  1. Sandeep G-MSFT 20,906 Reputation points Microsoft Employee Moderator
    2023-02-27T04:01:57.9733333+00:00

    @Zeeshan

    Usually as per the error it looks like an issue with RBAC roles not assigned properly. You will have to assign a specific role to service principle on the subscription level. Role that should be assigned to service principal should have 'Microsoft.Network/networkSecurityGroups/read' permission in it.

    Can we work on this issue offline.

    Please send us an email on azcommunity [at] microsoft [dot] com with Sub - Attn: Sandeg and following details in the email body:

    Link to this thread/post

    We can connect offline and discuss further on this.


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.