如何解决Azure 存储身份验证失败 - 受众验证失败观众不匹配 [天蓝色][OAuth]
我正在尝试使用以下代码对 Azure 存储进行 REST 调用。
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>AuthenticationFailed</Code>
<Message>Server Failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\n' +
'RequestId:11c07be7-301e-0003-556f-42091d000000\n' +
'Time:2021-05-06T11:59:40.1049759Z</Message>
<AuthenticationErrorDetail>Audience validation Failed. Audience did not match.</AuthenticationErrorDetail>
</Error>
但是还是这个错误。有人可以帮忙吗?
解决方法
您的访问令牌的受众不正确。 aud
(观众)应该看起来像 https://xxxx.blob.core.windows.net
。
在请求访问令牌时确保 scope
为 https://{account-name}.blob.core.windows.net/user_impersonation
。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。