具有 SharePoint 连接的 Azure 逻辑应用

标签 azure powershell sharepoint sharepoint-online azure-logic-apps

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

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

{
  "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 环境?

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

enter image description here

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

最佳答案

这对于 OAuth 连接来说似乎需要在模板部署后重新授权才能获取有效的访问 token 。某些连接支持使用 Azure Active Directory (Azure AD) 服务主体来授权在 Azure AD 中注册的逻辑应用的连接。

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

{
   <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://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-azure-resource-manager-templates-overview#authenticate-connections

关于具有 SharePoint 连接的 Azure 逻辑应用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60230373/

相关文章:

javascript - SharePoint REST API URL

javascript - sharepoint 2010。在所有项目显示表单的代码中包含 javascript

azure - 如何检查 powershell 脚本是否正在 Azure 中运行

wcf - Windows Azure 服务总线中继服务的 Javascript 客户端?

Azure Active Directory - 基于角色的存储管理器

powershell - 删除 Windows PowerShell 转录起始 header

Powershell ConvertTo-Json 缺少方括号并添加新字符

Windows 用户环境变量与系统环境变量

javascript - 有没有办法将来自 NodeJS Azure Function 的消息延迟放入 Azure 存储队列中?

c# - Sharepoint 的 CAML 查询中的日期时间比较