【发布时间】:2022-11-25 21:04:36
【问题描述】:
我创建了一个 Azure AD 服务主体并生成令牌,我正在使用客户端凭据流:
POST https://login.microsoftonline.com/tenantID/oauth2/token
&client_id = redacted
&grant_type = client_credentials
&resource = https://storage.azure.com
&client_secret = redacted
令牌生成成功,但当我尝试列出我的存储帐户中的容器时,它抛出了授权权限不匹配的错误。
为了列出容器,我使用了以下查询
GET https://storageaccname.blob.core.windows.net/?comp=list
错误详情:
<?xml version="1.0" encoding="utf-8"?>
<Error>
<Code>AuthorizationPermissionMismatch</Code>
<Message>This request is not authorized to perform this operation using this permission.
RequestId:
Time:2022-11-20T08:12:24.9827677Z</Message>
</Error>
我不确定在我发现一些谷歌搜索后我缺少什么权限存储 Blob 数据贡献者角色是必须的。我将此角色分配给了我创建的服务委托人。
但仍然是同样的错误,有什么解决方法可以解决我的问题吗??
【问题讨论】:
标签: azure postman azure-storage