为事件网格API连接认证系统分配的身份

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

任何人都可以帮助我在ARM模板中找到系统分配的身份的客户端机密,或建议其他方法吗?

[我有一个ARM模板,用于使用系统分配的身份创建一个Logic App,现在我想设置一个API连接以从事件网格触发(不使用门户网站UI或单独的powershell命令)。

我不知道如何为系统分配的身份获取客户端密码。这将使我能够遵循前面这些问题的答案:

这是我到目前为止的内容:

"resources": [
        {
            "apiVersion": "2016-06-01",
            "type": "Microsoft.logic/workflows",
            "name": "[variables('logicName')]",
            "location": "[resourceGroup().location]",
            "identity": {
                "type": "SystemAssigned"
            },    
            "dependsOn": [
                "[variables('connections_azuretables_name')]"
            ],
            "properties": {
                "state": "Enabled",
                "definition": {
                   <<SNIP>>
                }
            }
        },
        {
            "type": "Microsoft.Web/connections",
            "apiVersion": "2016-06-01",
            "name": "[variables('azureEventGridConnectionAPIName')]",
            "location": "[resourceGroup().location]",
            "properties": {
                "api": {
                "id": "[concat('/subscriptions/subscriptionId', '/providers/Microsoft.Web/locations/', 'eastasia', '/managedApis/', 'azureeventgrid')]"

                },
                "parameterValues": {
                "token:clientId": "[reference(variables('logicName'), '2016-06-01', 'Full').identity.principalId]",
                "token:clientSecret": "########### STUCK HERE #################",
                "token:TenantId": "[reference(variables('logicName'), '2016-06-01', 'Full').identity.tenantId]",
                "token:grantType": "client_credentials"
                },
                "displayName": "[variables('azureEventGridConnectionAPIName')]"

            },
            "dependsOn": []
            }
    ],
azure arm-template
1个回答
0
投票

受管身份没有客户机密。它仅包含证书,您无法访问。

模板必须在逻辑应用程序中执行才能获取访问令牌,我怀疑这样做是否可以。

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