我正在尝试使用 Azure 文件 api "https://"mystorageaccountname".file.core.windows.net/?comp=list"
链接:https://learn.microsoft.com/en-us/rest/api/storageservices/list-shares
身份验证方法:OAuth 2.0
我已生成“授权代码”和“访问 token ”。
链接:https://learn.microsoft.com/en-us/azure/active-directory/develop/v1-protocols-oauth-code
已创建 Azure 广告域服务资源
在我的存储帐户中启用了“Azure 文件的 Azure Active Directory 身份验证”。
链接:https://learn.microsoft.com/en-gb/azure/storage/files/storage-files-active-directory-enable
标题:
- 授权:不记名eyJ0.................
- x-ms-date:2019 年 4 月 23 日星期二 11:35:45 GMT
- x-ms-版本:2018-03-28
错误:
<Error>
<Code>AuthenticationFailed</Code>
<Message>Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
RequestId:40fcb1a8-301a-000d-67c8-f9f4b5000000
Time:2019-04-23T11:35:52.9358422Z</Message>
<AuthenticationErrorDetail>
Authentication scheme Bearer is not supported.
</AuthenticationErrorDetail>
</Error>
最佳答案
您收到此错误的原因是,目前仅通过 SMB
协议(protocol)支持基于 Azure AD 的 Azure 文件授权。 REST API
仍然不支持它。
对于 REST API,目前仅 Blob 和队列服务支持基于 Azure AD 的授权。 Read the matrix of storage account authorizations .
关于Azure 存储文件 "Authentication scheme Bearer is not supported." "AuthenticationFailed",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55811030/