1

I was trying to access the CLI in azure. I wanted to execute the script in Power shell CLI. But I'm not able to create a storage account for PowerShell in azure.

enter image description here

4c74356b41
  • 69,186
  • 6
  • 100
  • 141
AKHIL KUMAR
  • 23
  • 1
  • 5

3 Answers3

1

You get the error that you are not authorized to perform action 'Microsoft.Resources/subscriptions/resourcegroups/read' over scope of storage account because you don't have the relevant permissions on the Storage Account.

You either need to have "Contributor" permissions to create & manage storage account or related resources. More details of the azure RBAC roles in the link

edit:

as 4c74356b41 mentioned in the comment, you need read role and scope should be resource group.

Sajeetharan
  • 216,225
  • 63
  • 350
  • 396
  • Im able to create resources like virtual machines, data factory etc under this resource group and subscription. do i need to add my account in the IAM of subscrition? – AKHIL KUMAR Feb 20 '20 at 10:56
  • Check your role permission for this particular resource cloud shell storage – Sajeetharan Feb 20 '20 at 10:59
  • how is this upvoted? this clearly says he needs read, not write, so its not contributor, but reader. also, not scope of storage account, but scope of resource group – 4c74356b41 Feb 20 '20 at 11:46
  • thanks for that, you are correct. OP has upvoted i guess – Sajeetharan Feb 20 '20 at 11:56
1

The error clearly indicates that you don’t have “read” permission on “cloud-shell-storage-westeurope” resource group.

Please ask your administrator to grant you proper permission on this resource group.

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241
  • alternatively, you can just follow ui prompts and specify another resource group for cli storage (or just specify existing storage to use for your cli permanent storage) – 4c74356b41 Feb 20 '20 at 11:49
1

if this happens during a lab session (as for me): check the region and chose "US West"

the instruction don't tell about. for me europe was pre-selected.

dermoritz
  • 12,519
  • 25
  • 97
  • 185