I'm trying to provision a bot resource in Azure with two connection (an Azure Active Directory V2 and a sharepoint Online) using ARM template (see bellow).
I was able to make it work for AADv2 successfully, and everything works fine. I was able to make it work when I provision the resource manually. Sadly, you can't export the templates for a bot resource...And I can't succeed to make it work for Sharepoint online, and the only parameter I don't know what to set is the Service Provider Id, as I was able to test setting the other manually. When i use the same as AADv2, the connection provisionned is AADv2 (30dd229c-58e3-4a48-bdfd-91ec48eb906c)...
My template to provision this resources is:
{
"name": "[concat(parameters('botId'),'/',parameters('SharepointConnectionName'))]",
"type": "Microsoft.BotService/botServices/Connections",
"apiVersion": "2017-12-01",
"location": "global",
"tags": {},
"sku": {
"name": "[parameters('sku')]"
},
"kind": "[parameters('kind')]",
"properties": {
"clientId": "[parameters('SharepointConnectionClientId')]",
"clientSecret": "[parameters('SharepointConnectionClientSecret')]",
"scopes": "[parameters('SharepointConnectionScopes')]",
"serviceProviderId": "[parameters('SharepointConnectionServiceProviderId')]",
"serviceProviderDisplayName": "[parameters('SharepointConnectionServiceProviderDisplayName')]",
"parameters": [
{
"key": "tenantId",
"value": "[parameters('SharepointConnectionTenantID')]"
},
{
"key": "clientId",
"value": "[parameters('SharepointConnectionClientId')]"
},
{
"key": "clientSecret",
"value": "[parameters('SharepointConnectionClientSecret')]"
},
{
"key": "GrantType",
"value": "[parameters('SharepointConnectionGrantType')]"
},
{
"key": "LoginURL",
"value": "[parameters('SharepointConnectionLoginURL')]"
},
{
"key": "DiscoveryURL",
"value": "[parameters('SharepointConnectionDiscoveryURL')]"
},
{
"key": "ResourceURL",
"value": "[parameters('SharepointConnectionResourceURL')]"
},
{
"key": "Capability",
"value": "[parameters('SharepointConnectionCapabilityURL')]"
}
]
},
"dependsOn": [
"[concat('Microsoft.BotService/botServices/', parameters('botId'))]"
]
}