Creating network interface StatusCode=0 -- Original Error: Code="AuthorizationFailed"

PATEL, VIRAL 20 Reputation points

Error: creating Network Interface: (Name "XXXX-02" / Resource Group "rg-01"): network.InterfacesClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="AuthorizationFailed" Message="The client 'obj__id' with object id 'obj__id' does not have authorization to perform action 'Microsoft.Network/networkInterfaces/write' over scope '/subscriptions/sp-1/resourceGroups/rg-01/providers/Microsoft.Network/networkInterfaces/XXXX-02' or the scope is invalid. If access was recently granted, please refresh your credentials."

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.
554 questions
0 comments No comments
{count} votes

Accepted answer
  1. shiva patpi 12,306 Reputation points Microsoft Employee


    Try providing the network contributor access permission for the objID over the resource group:

    You can use the below command or you can do it through IAM on the resource group

    az role assignment create --assignee <object_id> --role "Network Contributor" --scope /subscriptions/<subscription_id>/resourceGroups/<resource_group_name>



    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful