具有SharePoint连接的Azure Logic应用 [英] Azure Logic App with SharePoint Connection

查看:76
本文介绍了具有SharePoint连接的Azure Logic应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建我的第一个逻辑应用程序,该应用程序连接到SharePoint并将条目添加到某些共享点列表中.

I am creating my first logic app which connects to SharePoint and adds entries into some sharepoint list.

每当我创建SharePoint连接时,它都会将以下资源添加到我的逻辑应用程序中.

Whenever I create a SharePoint Connection it adds below resource to my logic app.

{
  "type": "MICROSOFT.WEB/CONNECTIONS",
  "apiVersion": "2018-07-01-preview",
  "name": "[parameters('sharepointonline_1_Connection_Name')]",
  "location": "[parameters('logicAppLocation')]",
  "properties": {
    "api": {
      "id": "[concat(subscription().id, '/providers/Microsoft.Web/locations/', parameters('logicAppLocation'), '/managedApis/', 'sharepointonline')]"
    },
    "displayName": "[parameters('sharepointonline_1_Connection_DisplayName')]",
    "nonSecretParameterValues": {
      "token:TenantId": "[parameters('sharepointonline_1_token:TenantId')]"
    }
  }

任何人都可以对"token:TenantId"进行解释.在我的开发租户中如何/在何处获得此价值.如何将其转移到UAT/PROD环境?

Could anyone give an explanation of "token:TenantId". How/where to get this value in my dev tenant. How this can be moved to UAT/PROD environment?

每当我使用SharePoint连接重新创建逻辑应用程序时,它都会失去连接并在屏幕下方显示警告图标.

Whenever I recreate my logic app with the SharePoint connection it loses the connection and shows me below screen with a warning icon.

有没有一种方法可以通过PowerShell或通过Azure DevOps部署来验证此连接?

Is there a way we can authenticate this connection via PowerShell or via Azure DevOps deployment?

推荐答案

这似乎与OAuth连接有关,在模板部署后需要重新授权才能获得有效的访问令牌.某些连接支持使用Azure Active Directory(Azure AD)服务主体来授权在Azure AD中注册的逻辑应用程序的连接.

This seems to the OAuth connection and will need to be re-authorized after the template deployment to obtain valid access token. Some connections support using an Azure Active Directory (Azure AD) service principal to authorize connections for a logic app that's registered in Azure AD.

此处的文档显示了如何配置Azure数据湖的连接资源定义以使用模板的参数值和Azure AD服务主体来生成令牌,因此您可能想检查是否可以以相同的方式配置SharePoint连接.

Documentation here shows how Azure data lake's connection resource definition can be configured to use parameter values of the template and Azure AD service principal to generate the token so you might want to check if SharePoint connection can be configured in same way or not.

{
   <other-template-objects>
   "type": "MICROSOFT.WEB/CONNECTIONS",
   "apiVersion": "2016-06-01",
   "name": "[parameters('azuredatalake_1_Connection_Name')]",
   "location": "[parameters('LogicAppLocation')]",
   "properties": {
      "api": {
         "id": "[concat(subscription().id, '/providers/Microsoft.Web/locations/', 'resourceGroup().location', '/managedApis/', 'azuredatalake')]"
      },
      "displayName": "[parameters('azuredatalake_1_Connection_DisplayName')]",
      "parameterValues": {
         "token:clientId": "[parameters('azuredatalake_1_token:clientId')]",
         "token:clientSecret": "[parameters('azuredatalake_1_token:clientSecret')]",
         "token:TenantId": "[parameters('azuredatalake_1_token:TenantId')]",
         "token:grantType": "[parameters('azuredatalake_1_token:grantType')]"
      }
   }
}

参考: https://docs.microsoft.com/zh-cn/azure/logic-apps/logic-apps-azure-resource-manager-templates-overview#authenticate-connections

这篇关于具有SharePoint连接的Azure Logic应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆