Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am trying to deploy a direct line channel in the bot channels registration with Enhanced Authentication enabled and some trusted domains. Creating the Direct Line channel itself works without problems, however the Enhanced Authentication simply won't enable, like it should as shown in the image below.

enter image description here

The strange thing is that when I run the same template two times, the Enhanced Authentication and the trusted domains are set correctly every time.

Is there something I am doing wrong here?

This is the Template I am running:

{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "botName": {
            "type": "string",
            "defaultValue": "[resourceGroup().name]"
        },
        "webAppName": {
            "type": "string",
            "defaultValue": "[resourceGroup().name]"
        },
        "appId": {
            "type": "string"
        },
        "sku": {
            "type": "string"
        }
    },
    "variables": {
        "siteHost": "[concat(toLower(parameters('webAppName')), '.azurewebsites.net')]",
        "botEndpoint": "[concat('https://', variables('siteHost'), '/api/messages')]"
    },
    "resources": [
        {
            "apiVersion": "2019-05-01",
            "name": "BotServiceDeployment",
            "type": "Microsoft.Resources/deployments",
            "properties": {
                "mode": "Incremental",
                "template": {
                    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
                    "contentVersion": "1.0.0.0",
                    "resources": []
                }
            }
        },
        {
            "apiVersion": "2020-06-02",
            "type": "Microsoft.BotService/botServices",
            "name": "[parameters('botName')]",
            "location": "global",
            "kind": "bot",
            "sku": {
                "name": "[parameters('sku')]"
            },
            "properties": {
                "name": "[parameters('botName')]",
                "displayName": "[parameters('botName')]",
                "endpoint": "[variables('botEndpoint')]",
                "msaAppId": "[parameters('appId')]"
            }
        },
        {
            "type": "Microsoft.BotService/botServices/channels",
            "apiVersion": "2020-06-02",
            "name": "[concat(parameters('botName'), '/DirectLineChannel')]",
            "location": "global",
            "dependsOn": [
                "[resourceId('Microsoft.BotService/botServices', parameters('botName'))]"
            ],
            "properties": {
                "properties": {
                    "sites": [
                        {
                            "siteName": "Default",
                            "isEnabled": true,
                            "isV1Enabled": true,
                            "isV3Enabled": true,
                            "isSecureSiteEnabled": true,
                            "trustedOrigins": [
                                "https://www.test1.com",
                                "https://www.test2.com"
                            ]
                        }
                    ]
                },
                "channelName": "DirectLineChannel"
            }
        }
    ]
}
question from:https://stackoverflow.com/questions/65869056/deploying-azure-arm-template-bot-channels-registration-directline-channel-fails

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.3k views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...