The client xxx with object id xxx does not have authorization to perform action Microsoft.Resources/subscriptions/resourcegroups/write' over scope

前端 未结 1 1457
无人及你
无人及你 2020-12-18 08:05

I am trying to create a Resource Group dynamically using Azure Management SDK Here are my azure configuration details

subscription=
clien         


        
相关标签:
1条回答
  • 2020-12-18 09:04

    you cant be trying with global administrator, obviously. you need to go to you subscription and grant objectid 'ae8bc2ea-9680-4f66-934c-ad40b82c30ac' contributor permissions (easy way) or create a custom role (or figure predefined role) that meets your needs.

    you can use portal to do that or azure powershell:

    New-AzRoleAssignment -ObjectId 'ae8bc2ea-9680-4f66-934c-ad40b82c30ac' -Scope '/subscriptions/e9d61100-a82a-48ca-b6f8-51b06a1eebe6' -RoleDefinitionName contributor
    

    the equivalent Azure CLI command is:

    az role assignment create --assignee-object-id ae8bc2ea-9680-4f66-934c-ad40b82c30ac --scope subscriptions/e9d61100-a82a-48ca-b6f8-51b06a1eebe6 --role contributor
    
    0 讨论(0)
提交回复
热议问题