krystiangw
krystiangw

Reputation: 529

Azure Bot Channel Deployment with Azure CLI - not able to create bot channels

I'm able to deploy Azure Bot registration channel using Azure CLI template

https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-template-deploy-cli

But I can't figure out how to set Facebook Channel credentials for new-created channel in the same script.

https://learn.microsoft.com/en-us/bot-framework/bot-service-manage-channels

I can't find any informations in the official docs

Here is part of my deployment template:

{
"resources": [
    {
        "type": "Microsoft.BotService/botServices",
        "sku": {
            "name": "[parameters('sku')]"
        },
        "kind": "[parameters('kind')]",
        "name": "[parameters('botId')]",
        "apiVersion": "2017-12-01",
        "location": "global",
        "properties": {
            "name": "[parameters('botId')]",
            "displayName": "[parameters('botId')]",
            "endpoint": "[variables('botEndpoint')]",
            "msaAppId": "[parameters('appId')]",
            "developerAppInsightsApplicationId": "[variables('insightsName')]",
            "developerAppInsightKey": "[reference(resourceId('microsoft.insights/components/', variables('insightsName')), '2015-05-01').InstrumentationKey]",
            "enabledChannels": [
                "webchat",
                "directline",
                "facebook"
            ],
            "configuredChannels": [
                "webchat",
                "facebook"
            ]
        },
        "dependsOn": [
            "[resourceId('microsoft.insights/components/', variables('insightsName'))]"
        ]
    }
]

}

Any ideas here?

Upvotes: 0

Views: 909

Answers (2)

Mike Veazie - MSFT
Mike Veazie - MSFT

Reputation: 906

You can set the Facebook channel with the Azure CLI.
https://learn.microsoft.com/en-us/cli/azure/bot/facebook?view=azure-cli-latest

az bot facebook create --appid
                       --name
                       --page-id
                       --resource-group
                       --secret
                       --token
                       [--add-disabled {false, true}]
                       [--subscription]

Upvotes: 0

Fei Han
Fei Han

Reputation: 27793

As you said, currently we cannot find official docs explain how to define ARM template (script) for Bot Channels Registration. I try to find that part in Automation script on Azure portal, I find that Microsoft.BotService/botServices is not exported and included in the template.

enter image description here

how to set Facebook Channel credentials for new-created channel in the same script.

I suspect that we cannot achieve that via ARM template at the moment. You had better to configure it on Azure portal. Besides, you can give a feedback for your feature request on github or Azure Bot Service UserVoice site.

Note:

Upvotes: 2

Related Questions