Azure存储表Rest API抛出403-即使传递了身份验证令牌,服务器也无法对请求进行身份验证

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

我正在尝试使用Rest API查询Azure存储表。这是我在做什么:

第1步:使用提取身份验证令牌GET:https://login.microsoftonline.com/ {tenant-id} / oauth2 / tokenenter image description here

[步骤2:在步骤1中使用auth令牌,我正在按照本文档中的描述调用查询表API:https://docs.microsoft.com/en-us/rest/api/storageservices/query-tables

enter image description here

抛出403-服务器无法验证请求错误。这是正确的方法吗?

azure azure-storage azure-table-storage
1个回答
2
投票
Azure表存储不支持使用Azure AD进行授权。

参考-Authorize access to Azure blobs and queues using Azure Active Directory

Azure AD授权可用于所有公共区域和国家云中的所有通用和Blob存储帐户。仅使用Azure资源管理器部署模型创建的存储帐户支持Azure AD授权。

[Azure表存储不支持使用Azure AD进行授权。

要授权对Azure Table存储的请求,您需要使用Shared KeyShared Key
© www.soinside.com 2019 - 2024. All rights reserved.