简体   繁体   中英

Get storage account access keys from Azure Resource Manager to make storage calls authentication failed

After getting access token, i run this below command but i got authentication error shown in fig attached.

$keysResponse = Invoke-WebRequest -Uri https://management.azure.com/subscriptions/SUBSCRIPTION-ID/resourceGroups/RESOURCE-GROUP/providers/Microsoft.Storage/storageAccounts/STORAGE-ACCOUNT/listKeys/?api-version=2016-12-01
    -Method POST -Headers @{Authorization="Bearer $ARMToken"}

错误信息

this means you do not have enough permissions to perform that action. ask your administrator to grant you permissions (easiest way - assign contributor role on the storage account).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM