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

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

botframework - Deploying Azure Arm template bot channels registration Directline Channel fails

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...