邮递员中列出 Azure 存储帐户中的表时身份验证失败

问题描述 投票:0回答:1

我正在尝试列出使用邮递员启用公共访问的天蓝色存储帐户中存在的表名称,但我收到身份验证失败错误:

错误

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
    <code>AuthenticationFailed</code>
    <message xml:lang="en-US">Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
RequestId: alphanumeric id
Time:2024-04-23T12:32:52.6326261Z</message>
</error>
URL: https://srcstoreacc131.table.core.windows.net/Tables?SASToken
Method: GET

您如何创建 SAS 令牌?请编辑您的问题并将其包含在内。 – 高拉夫·曼特里

在存储帐户 > SAS 菜单 > 选择表和权限作为列表,然后生成 SAS URL/令牌。

azure postman azure-table-storage
1个回答
0
投票

如果您在调用 API 时未传递有效 SAS 令牌,则会发生错误。最初,当我在 sig 之后使用额外的空间运行 API 时,也遇到了

同样的错误
,如下所示:

GET https://storageaccname.table.core.windows.net/Tables?SASToken

回复:

enter image description here

要解决该错误,请生成具有正确权限的 SAS 令牌,并在调用 API 时将其正确包含在 valid 签名中。

就我而言,我通过选择以下权限生成了SAS令牌

enter image description here enter image description here

当我通过删除末尾的额外空格,使用 valid SAS 令牌再次调用 REST API 时,我成功获得了 response,其中包含如下表列表:

GET https://storageaccname.table.core.windows.net/Tables?SASToken

回复:

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.