az bot authsetting create throws AuthorizationFailed Error
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
When running the following command in the azure CLI:
```
az bot authsetting create `
--resource-group $resourceGroupName `
--name $botRegistration.name `
--service Aadv2 `
--setting-name $_.name `
--client-id $_.clientId `
--client-secret $_.clientSecret `
--provider-scope-string $_.scopes `
--parameters clientId=$($_.clientId) clientSecret=$($_.clientSecret) tenantId=$tenantId tokenExchangeUrl=api://botid-$($_.clientId)
```
It throws the error:
The client 'xxx-xxx-xx' with object id 'xxx-xxx-xx' does not have authorization to perform action 'Microsoft.BotService/listAuthServiceProviders/action' over scope '/subscriptions/xxx-xxx-xx' or the scope is invalid. If access was recently granted, please refresh your credentials.
This does not seem to make any sense, as doing the same with an ARM template has no problems. The Account running the command has Contributor rights on the resource group level.
Contributor guide
Assessment
This issue has not been assessed yet.