azure-cli: az bot create "AuthorizationFailed" error

If I run the following command in the CLI:

az bot create -k function -n Cloudguy_CLI_Bot -g Cloudguy_CLI_Bot -l westus --lang Node -v v4 I get the following error:

(AuthorizationFailed) The client ‘live.com#sbi@solvion.net’ with object id ‘4682d714-d4ea-480a-9ffa-29370ebcb3f7’ does not have authorization to perform action ‘Microsoft.BotService/checkNameAvailability/read’ over scope ‘/providers/Microsoft.BotService’. Traceback (most recent call last): File “C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\knack\cli.py”, line 197, in invoke cmd_result = self.invocation.execute(args) File “C:\Users\troyd\AppData\Local\Temp\pip-install-8mvi0rnf\azure-cli-core\azure\cli\core\commands_init_.py”, line 369, in execute File “C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\six.py”, line 693, in reraise raise value File “C:\Users\troyd\AppData\Local\Temp\pip-install-8mvi0rnf\azure-cli-core\azure\cli\core\commands_init_.py”, line 343, in execute File “C:\Users\troyd\AppData\Local\Temp\pip-install-8mvi0rnf\azure-cli-core\azure\cli\core\commands_init_.py”, line 182, in call File “C:\Users\troyd\AppData\Local\Temp\pip-install-8mvi0rnf\azure-cli-core\azure\cli\core_init_.py”, line 436, in default_command_handler File “C:\Users\troyd\AppData\Local\Temp\pip-install-8mvi0rnf\azure-cli-botservice\azure\cli\command_modules\botservice\custom.py”, line 84, in create File “C:\Users\troyd\AppData\Local\Temp\pip-install-8mvi0rnf\azure-mgmt-botservice\azure\mgmt\botservice\operations\bots_operations.py”, line 491, in get_check_name_availability azure.mgmt.botservice.models.error.ErrorException: (AuthorizationFailed) The client ‘live.com#sbi@solvion.net’ with object id ‘4682d714-d4ea-480a-9ffa-29370ebcb3f7’ does not have authorization to perform action ‘Microsoft.BotService/checkNameAvailability/read’ over scope ‘/providers/Microsoft.BotService’.

I tried logging into the CLI with both a MSA and a corporate account, but both seem to have the same issue. Any ideas?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

@tjprescott after some more investigation, i see that the checknameavailability api is not being called properly in my cli code. so i will have to fix it in the command module. the api seemed to work on my tenant but doesnt work in all tenants. i will remove the faulty api in a pr