Azure 存储文件“不支持身份验证方案承载。” “身份验证失败”

Muh*_*qui 7 api storage file azure

我正在尝试使用 Azure 文件 api "https://"mystorageaccountname".file.core.windows.net/?comp=list"

链接: https: //learn.microsoft.com/en-us/rest/api/storageservices/list-shares

认证方式:OAuth 2.0

标题:

  • 授权:不记名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>
Run Code Online (Sandbox Code Playgroud)

Gau*_*tri 3

收到此错误的原因是,当前仅通过SMB协议支持基于 Azure AD 的 Azure 文件授权。仍然不支持通过REST API.

对于 REST API,目前仅 Blob 和队列服务支持基于 Azure AD 的授权。读取存储帐户授权矩阵

  • 我使用了 hte blob storage url,但它仍然给出相同的错误 (5认同)