ARM Template for API connections - O365 with Autherization

%3CLINGO-SUB%20id%3D%22lingo-sub-2142896%22%20slang%3D%22en-US%22%3EARM%20Template%20for%20API%20connections%20-%20O365%20with%20Autherization%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2142896%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20Trying%20to%20api%20connections%20for%20O365%2C%20I%20am%20trying%20to%20add%20the%20credentials%20to%20authorize%20the%20connections%20for%20this%20api.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20to%20include%20credentials%20details%20in%20the%20template%2Fpara%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%22%24schema%22%3A%20%22%3CA%20href%3D%22https%3A%2F%2Fschema.management.azure.com%2Fproviders%2FMicrosoft.Logic%2Fschemas%2F2019-08-01%2Fworkflowdefinition.json%23%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fschema.management.azure.com%2Fproviders%2FMicrosoft.Logic%2Fschemas%2F2019-08-01%2Fworkflowdefinition.json%23%3C%2FA%3E%22%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%20%22contentVersion%22%3A%20%221.0.0.0%22%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%20%22parameters%22%3A%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22apiconname%22%3A%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22type%22%3A%20%22Array%22%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%20%7D%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%20%22variables%22%3A%20%7B%7D%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%20%22resources%22%3A%20%5B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22copy%22%3A%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22name%22%3A%20%22apiconname%22%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22count%22%3A%20%22%5Blength(parameters('apiconname'))%5D%22%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22type%22%3A%20%22Microsoft.Web%2Fconnections%22%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22apiVersion%22%3A%20%222016-06-01%22%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22name%22%3A%20%22%5Bconcat(parameters('apiconname')%5BcopyIndex()%5D.properties.apiname)%5D%22%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22location%22%3A%20%22eastus%22%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22kind%22%3A%20%22V1%22%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22properties%22%3A%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22displayName%22%3A%20%22%5Bconcat(parameters('apiconname')%5BcopyIndex()%5D.properties.displayName)%5D%22%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22customParameterValues%22%3A%20%7B%7D%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22ParameterValues%22%3A%20%7B%7D%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22api%22%3A%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22id%22%3A%20%22%5Bconcat(subscription().id%2C'%2Fproviders%2FMicrosoft.Web%2Flocations%2F'%2C%20resourceGroup().location%2C%20'%2FmanagedApis%2F'%2C%20parameters('apiconname')%5BcopyIndex()%5D.properties.api)%5D%22%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%20%5D%3C%2FP%3E%3CP%3E%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPara%20File%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%22%24schema%22%3A%20%22%3CA%20href%3D%22https%3A%2F%2Fschema.management.azure.com%2Fproviders%2FMicrosoft.Logic%2Fschemas%2F2019-08-01%2Fworkflowdefinition.json%23%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fschema.management.azure.com%2Fproviders%2FMicrosoft.Logic%2Fschemas%2F2019-08-01%2Fworkflowdefinition.json%23%3C%2FA%3E%22%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%20%22contentVersion%22%3A%20%221.0.0.0%22%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%20%22parameters%22%3A%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22apiconname%22%3A%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22value%22%3A%20%5B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22properties%22%3A%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22apiname%22%3A%20%22Test1%22%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22displayName%22%3A%20%22D1%22%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22api%22%3A%20%22office365%22%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22properties%22%3A%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22apiname%22%3A%20%22Test2%22%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22displayName%22%3A%20%22D2%22%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22api%22%3A%20%22office365%22%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%5D%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%20%7D%3C%2FP%3E%3CP%3E%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Hi All,

 

I am Trying to api connections for O365, I am trying to add the credentials to authorize the connections for this api. 

 

How to include credentials details in the template/para

 

{

  "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2019-08-01/workflowdefinition....",

  "contentVersion": "1.0.0.0",

  "parameters": {

    "apiconname": {

      "type": "Array"

    }

  },

  "variables": {},

  "resources": [

    {

      "copy": {

        "name": "apiconname",

        "count": "[length(parameters('apiconname'))]"

      },

      "type": "Microsoft.Web/connections",

      "apiVersion": "2016-06-01",

      "name": "[concat(parameters('apiconname')[copyIndex()].properties.apiname)]",

      "location": "eastus",

      "kind": "V1",

      "properties": {

        "displayName": "[concat(parameters('apiconname')[copyIndex()].properties.displayName)]",

        "customParameterValues": {},

        "ParameterValues": {},

        "api": {

          "id": "[concat(subscription().id,'/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/', parameters('apiconname')[copyIndex()].properties.api)]"

        }

      }

    }

  ]

}

 

 

Para File:

 

{

  "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2019-08-01/workflowdefinition....",

  "contentVersion": "1.0.0.0",

  "parameters": {

    "apiconname": {

      "value": [

        {

          "properties": {

            "apiname": "Test1",

            "displayName": "D1",

            "api": "office365"

          }

        },

        {

          "properties": {

            "apiname": "Test2",

            "displayName": "D2",

            "api": "office365"

          }

        }

      ]

    }

  }

}

 

0 Replies