繁体   English   中英

逻辑应用查询 Azure Table 使用 HTTP 和 Managed Identity 认证

[英]Logic App query Azure Table using HTTP and Managed Identity authentication

我正在尝试使用 HTTP 连接器查询 Azure 表但没有成功。

根据此文档,托管身份验证现在可以用于 Azure 表: https://learn.microsoft.com/en-us/azure/storage/tables/authorize-managed-identity

如文档所示,我已使用 PowerShell 授权 azure 表中消费逻辑应用程序的托管身份。 https://learn.microsoft.com/en-us/azure/storage/tables/assign-azure-role-data-access?tabs=powershell

New-AzRoleAssignment -ObjectID xxxxxxxxxxxxxxxx `
 -RoleDefinitionName "Storage Table Data Contributor" `
 -Scope  "/subscriptions/<subscription>/resourceGroups/<resource-group>/providers/Microsoft.Storage/storageAccounts/<storage-account>/tableServices/default/tables/<table>"

然后在逻辑应用程序中,我填写了请求,如下所述: https://learn.microsoft.com/en-us/rest/api/storageservices/query-tables#request-headers

配置的屏幕截图

运行失败,禁止缺少授权 header。

"body": {
     "odata.error": {
         "code": "AuthenticationFailed",
         "message": {
             "lang": "en-US",
             "value": "Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:8d5dbe66-d002-0005-26e6-45da23000000\nTime:2022-04-01T16:35:57.2213453Z"
         }
     }
 }

有任何想法吗?

所以基本上通过下面的设置我能够成功查询 Azure 表超过 HTTP

标头:

在此处输入图像描述

结果:

在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM