az bot

Manage Microsoft Azure Bot Service.

Commands

az bot authsetting Manage OAuth connection settings on a bot.
az bot authsetting create Create an OAuth connection setting on a bot.
az bot authsetting delete Delete an OAuth connection setting on a bot.
az bot authsetting list Show all OAuth connection settings on a bot.
az bot authsetting list-providers List details for all service providers available for creating OAuth connection settings.
az bot authsetting show Show details of an OAuth connection setting on a bot.
az bot create Create a new v4 SDK bot.
az bot delete Delete an existing bot.
az bot directline Manage the Directline Channel on a bot.
az bot directline create Create the DirectLine Channel on a bot with only v3 protocol enabled.
az bot directline delete Delete the Directline Channel on a bot.
az bot directline show Get details of the Directline Channel on a bot.
az bot download Download an existing bot.
az bot email Manage the email Channel on a bot.
az bot email create Create the Email Channel on a bot.
az bot email delete Delete the email Channel on a bot.
az bot email show Get details of the email Channel on a bot.
az bot facebook Manage the Facebook Channel on a bot.
az bot facebook create Create the Facebook Channel on a bot.
az bot facebook delete Delete the Facebook Channel on a bot.
az bot facebook show Get details of the Facebook Channel on a bot.
az bot kik Manage the Kik Channel on a bot.
az bot kik create Create the Kik Channel on a bot.
az bot kik delete Delete the Kik Channel on a bot.
az bot kik show Get details of the Kik Channel on a bot.
az bot msteams Manage the Microsoft Teams Channel on a bot.
az bot msteams create Create the Microsoft Teams Channel on a bot.
az bot msteams delete Delete the Microsoft Teams Channel on a bot.
az bot msteams show Get details of the Microsoft Teams Channel on a bot.
az bot prepare-deploy Add scripts/config files for publishing with `az webapp deployment`.
az bot prepare-publish (Maintenance mode) Add scripts to your local source code directory to be able to publish back using `az bot publish` for v3 SDK bots.
az bot publish Publish to a bot's associated app service.
az bot show Get an existing bot.
az bot skype Manage the Skype Channel on a bot.
az bot skype create Create the Skype Channel on a bot.
az bot skype delete Delete the Skype Channel on a bot.
az bot skype show Get details of the Skype Channel on a bot.
az bot slack Manage the Slack Channel on a bot.
az bot slack create Create the Slack Channel on a bot.
az bot slack delete Delete the Slack Channel on a bot.
az bot slack show Get details of the Slack Channel on a bot.
az bot sms Manage the SMS Channel on a bot.
az bot sms create Create the SMS Channel on a bot.
az bot sms delete Delete the SMS Channel on a bot.
az bot sms show Get details of the SMS Channel on a bot.
az bot telegram Manage the Telegram Channel on a bot.
az bot telegram create Create the Telegram Channel on a bot.
az bot telegram delete Delete the Telegram Channel on a bot.
az bot telegram show Get details of the Telegram Channel on a bot.
az bot update Update an existing bot.
az bot webchat Manage the Webchat Channel on a bot.
az bot webchat show Get details of the Webchat Channel on a bot.

az bot create

Create a new v4 SDK bot.

az bot create --appid
--kind {registration, webapp}
--name
--password
--resource-group
[--description]
[--display-name]
[--echo {false, true}]
[--endpoint]
[--lang {Csharp, Javascript}]
[--location]
[--sku {F0, S1}]
[--subscription]
[--tags]
[--version {v4}]

Required Parameters

--appid

The Microsoft account ID (MSA ID) to be used with the bot.

--kind -k

The kind of the bot.

accepted values: registration, webapp
--name -n

The resource name of the bot. Bot name must be between 4 and 42 characters in length. Bot name can only have the following characters -, a - z, A - Z, 0 - 9, and _.

--password -p

The Microsoft account (MSA) password for the bot. Used to authorize messages being sent to the bot.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--description -d

The description of the bot.

--display-name

The display name of the bot. If not specified, defaults to the name of the bot.

--echo

Deploy an Echo Bot template to the newly created v4 Web App Bot.

accepted values: false, true
--endpoint -e

The messaging endpoint of the bot.

--lang

The language to be used to create the bot.

accepted values: Csharp, Javascript
--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

default value: Central US
--sku

The Sku of the bot.

accepted values: F0, S1
default value: F0
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Space-separated tags in 'key[=value]' format. Use "" to clear existing tags.

--version -v

The Microsoft Bot Builder SDK version to be used to create the bot.

accepted values: v4
default value: v4

az bot delete

Delete an existing bot.

az bot delete --name
--resource-group
[--subscription]

Required Parameters

--name -n

The resource name of the bot. Bot name must be between 4 and 42 characters in length. Bot name can only have the following characters -, a - z, A - Z, 0 - 9, and _.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az bot download

Download an existing bot.

az bot download --name
--resource-group
[--save-path]
[--subscription]

Required Parameters

--name -n

The resource name of the bot. Bot name must be between 4 and 42 characters in length. Bot name can only have the following characters -, a - z, A - Z, 0 - 9, and _.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--save-path

The directory to download bot code to.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az bot prepare-deploy

Add scripts/config files for publishing with az webapp deployment.

az bot prepare-deploy --lang {Csharp, Javascript, Typescript}
[--code-dir]
[--proj-file-path]
[--subscription]

Examples

Prepare to use `az webapp` to deploy a Javascript bot by fetching a Node.js IIS web.config file.

az bot prepare-deploy --lang Javascript --code-dir "MyBotCode"

Prepare to use `az webapp` to deploy a Csharp bot by creating a .deployment file.

az bot prepare-deploy --lang Csharp --code-dir "." --proj-file-path "MyBot.csproj"

Required Parameters

--lang

The language or runtime of the bot.

accepted values: Csharp, Javascript, Typescript

Optional Parameters

--code-dir

The directory to place the generated deployment files in. Defaults to the current directory the command is called from.

--proj-file-path

The path to the .csproj file relative to --code-dir.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az bot prepare-publish

(Maintenance mode) Add scripts to your local source code directory to be able to publish back using az bot publish for v3 SDK bots.

az bot prepare-publish --name
--proj-file-path
--resource-group
--sln-name
[--code-dir]
[--subscription]
[--version {v3, v4}]

Required Parameters

--name -n

The resource name of the bot. Bot name must be between 4 and 42 characters in length. Bot name can only have the following characters -, a - z, A - Z, 0 - 9, and _.

--proj-file-path

Path to the start up project file name. (E.g. "./EchoBotWithCounter.csproj") Required only for C#.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--sln-name

Name of the start up solution file name. Required only for C#.

Optional Parameters

--code-dir

The directory to download deployment scripts to.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--version -v

The Microsoft Bot Builder SDK version to be used in the bot template that will be created.

accepted values: v3, v4
default value: v3

az bot publish

Publish to a bot's associated app service.

az bot publish --name
--resource-group
[--code-dir]
[--keep-node-modules {false, true}]
[--proj-file-path]
[--subscription]
[--timeout]
[--version]

Examples

Publish source code to your Azure App, from within the bot code folder

az bot publish -n botName -g MyResourceGroup

Required Parameters

--name -n

The resource name of the bot. Bot name must be between 4 and 42 characters in length. Bot name can only have the following characters -, a - z, A - Z, 0 - 9, and _.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--code-dir

The directory to upload bot code from.

--keep-node-modules

Keep node_modules folder and do not run npm install on the App Service. This can greatly speed up publish commands for Node.js SDK bots.

accepted values: false, true
--proj-file-path

Path to the start up project file name. (E.g. "./EchoBotWithCounter.csproj").

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout -t

Configurable timeout in seconds for checking the status of deployment.

--version -v

The Microsoft Bot Builder SDK version of the bot.

default value: v4

az bot show

Get an existing bot.

az bot show --name
--resource-group
[--msbot {false, true}]
[--subscription]

Examples

Get the information needed to connect to an existing bot on Azure

az bot show -n botName -g MyResourceGroup --msbot

Required Parameters

--name -n

The resource name of the bot. Bot name must be between 4 and 42 characters in length. Bot name can only have the following characters -, a - z, A - Z, 0 - 9, and _.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--msbot

Show the output as JSON compatible with a .bot file.

accepted values: false, true
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az bot update

Update an existing bot.

az bot update --name
--resource-group
[--ai-api-key]
[--ai-app-id]
[--ai-key]
[--description]
[--display-name]
[--endpoint]
[--sku {F0, S1}]
[--subscription]
[--tags]

Examples

Update description on a bot

az bot update -n botName -g MyResourceGroup --endpoint "https://bing.com/api/messages" --display-name "Hello World"

Required Parameters

--name -n

The resource name of the bot. Bot name must be between 4 and 42 characters in length. Bot name can only have the following characters -, a - z, A - Z, 0 - 9, and _.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--ai-api-key --app-insights-api-key

Azure Application Insights API Key used to read bot analytics data. Provide a key if you want to view analytics about your bot in the Analytics blade.

--ai-app-id --app-insights-app-id

Azure Application Insights Application ID used to read bot analytics data. Provide an Id if you want to view analytics about your bot in the Analytics blade.

--ai-key --app-insights-key

Azure Application Insights Key used to write bot analytics data. Provide a key if you want to receive bot analytics.

--description

The bot's new description.

--display-name -d

The bot's new display name.

--endpoint -e

The new endpoint of the bot. Must start with "https://".

--sku

The Sku of the bot.

accepted values: F0, S1
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Space-separated tags in 'key[=value]' format. Use "" to clear existing tags.