Share via


az bot

Manage Microsoft Azure Bot Service.

Commands

Name Description Type Status
az bot authsetting

Manage OAuth connection settings on a bot.

Core GA
az bot authsetting create

Create an OAuth connection setting on a bot.

Core GA
az bot authsetting delete

Delete an OAuth connection setting on a bot.

Core GA
az bot authsetting list

Show all OAuth connection settings on a bot.

Core GA
az bot authsetting list-providers

List details for all service providers available for creating OAuth connection settings.

Core GA
az bot authsetting show

Show details of an OAuth connection setting on a bot.

Core GA
az bot create

Create a new v4 SDK bot.

Core GA
az bot delete

Delete an existing bot.

Core GA
az bot directline

Manage the Directline Channel on a bot.

Core Preview
az bot directline create

Create the DirectLine Channel on a bot with only v3 protocol enabled.

Core Preview
az bot directline delete

Delete the Directline Channel on a bot.

Core Preview
az bot directline show

Get details of the Directline Channel on a bot.

Core Preview
az bot directline update

Update the DirectLine Channel on a bot with only v3 protocol enabled.

Core Preview
az bot download

Download an existing bot.

Core Preview
az bot email

Manage the email Channel on a bot.

Core Preview
az bot email create

Create the Email Channel on a bot.

Core Preview
az bot email delete

Delete the email Channel on a bot.

Core Preview
az bot email show

Get details of the email Channel on a bot.

Core Preview
az bot facebook

Manage the Facebook Channel on a bot.

Core Preview
az bot facebook create

Create the Facebook Channel on a bot.

Core Preview
az bot facebook delete

Delete the Facebook Channel on a bot.

Core Preview
az bot facebook show

Get details of the Facebook Channel on a bot.

Core Preview
az bot kik

Manage the Kik Channel on a bot.

Core Preview
az bot kik create

Create the Kik Channel on a bot.

Core Preview
az bot kik delete

Delete the Kik Channel on a bot.

Core Preview
az bot kik show

Get details of the Kik Channel on a bot.

Core Preview
az bot msteams

Manage the Microsoft Teams Channel on a bot.

Core Preview
az bot msteams create

Create the Microsoft Teams Channel on a bot.

Core Preview
az bot msteams delete

Delete the Microsoft Teams Channel on a bot.

Core Preview
az bot msteams show

Get details of the Microsoft Teams Channel on a bot.

Core Preview
az bot prepare-deploy

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

Core GA
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.

Core Preview
az bot publish

Publish to a bot's associated app service.

Core Preview
az bot show

Get an existing bot.

Core GA
az bot skype

Manage the Skype Channel on a bot.

Core Preview
az bot skype create

Create the Skype Channel on a bot.

Core Preview
az bot skype delete

Delete the Skype Channel on a bot.

Core Preview
az bot skype show

Get details of the Skype Channel on a bot.

Core Preview
az bot slack

Manage the Slack Channel on a bot.

Core Preview
az bot slack create

Create the Slack Channel on a bot.

Core Preview
az bot slack delete

Delete the Slack Channel on a bot.

Core Preview
az bot slack show

Get details of the Slack Channel on a bot.

Core Preview
az bot sms

Manage the SMS Channel on a bot.

Core Preview
az bot sms create

Create the SMS Channel on a bot.

Core Preview
az bot sms delete

Delete the SMS Channel on a bot.

Core Preview
az bot sms show

Get details of the SMS Channel on a bot.

Core Preview
az bot telegram

Manage the Telegram Channel on a bot.

Core Preview
az bot telegram create

Create the Telegram Channel on a bot.

Core Preview
az bot telegram delete

Delete the Telegram Channel on a bot.

Core Preview
az bot telegram show

Get details of the Telegram Channel on a bot.

Core Preview
az bot update

Update an existing bot.

Core GA
az bot webchat

Manage the Webchat Channel on a bot.

Core GA
az bot webchat show

Get details of the Webchat Channel on a bot.

Core GA

az bot create

Create a new v4 SDK bot.

az bot create --app-type
              --appid
              --name
              --resource-group
              [--cmk]
              [--description]
              [--display-name]
              [--endpoint]
              [--location]
              [--msi-resource-id]
              [--sku {F0, S1}]
              [--tags]
              [--tenant-id]

Required Parameters

--app-type

Microsoft App Type for the bot. Possible values include: "UserAssignedMSI", "SingleTenant", "MultiTenant".

--appid

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

--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

--cmk --cmk-key-vault-key-url

The key vault key url to enable Customer Managed Keys encryption.

--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.

--endpoint -e

The messaging endpoint of the bot.

--location -l

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

Default value: global
--msi-resource-id

Microsoft App Managed Identity Resource Id for the bot.

--sku

The Sku of the bot.

Accepted values: F0, S1
Default value: F0
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--tenant-id

Microsoft App Tenant Id for the bot.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az bot delete

Delete an existing bot.

az bot delete --name
              --resource-group

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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az bot download

Preview

This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Download an existing bot.

The source code is downloaded from the web app associated with the bot. You can then make changes to it and publish it back to your app.

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

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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az bot prepare-deploy

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

Add scripts or configuration files to the root of your local source code directory to be able to publish using az webapp deployment. When your code is deployed to your App Service, the generated scripts or configuration files should be appear in D:\home\site\wwwroot on App Service's Kudu web page.

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

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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az bot prepare-publish

Preview

This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

(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]
                       [--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.

--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
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az bot publish

Preview

This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Publish to a bot's associated app service.

Publish your source code to your bot's associated app service. This is DEPRECATED for v4 bots and no longer recommended for publishing v4 bots to Azure. Instead use az bot prepare-deploy and az webapp deployment to deploy your v4 bot. For more information see https://aka.ms/deploy-your-bot.

az bot publish --name
               --resource-group
               [--code-dir]
               [--keep-node-modules {false, true}]
               [--proj-file-path]
               [--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").

--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
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az bot show

Get an existing bot.

Get information about an existing bot. To get the information needed to connect to the bot, use the --msbot flag with the command.

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

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
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az bot update

Update an existing bot.

az bot update --name
              --resource-group
              [--ai-api-key]
              [--ai-app-id]
              [--ai-key]
              [--cmk]
              [--cmk-off]
              [--description]
              [--display-name]
              [--endpoint]
              [--icon-url]
              [--sku {F0, S1}]
              [--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.

--cmk --cmk-key-vault-key-url

The key vault key url to enable Customer Managed Keys encryption.

--cmk-off

Set encryption to Microsoft-Managed Keys.

--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://".

--icon-url

Icon URL for bot avatar. Accepts PNG files with file size limit of 30KB.

--sku

The Sku of the bot.

Accepted values: F0, S1
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.