[CLI] Authentication is not configured from Skill->VA
What project is affected?
Botskills CLI
What language is this in?
CLI
What happens?
When running the botskills commands in at least the build pipeline, the
What are the steps to reproduce this issue?
Add a skill with auth:
botskills connect --remoteManifest "{remoteManifestUrl}" --luisFolder '..\..\..\..\..\skills\csharp\todoskill\Deployment\Resources\LU\' --cs --noRefresh --languages 'en-us'
What were you expecting to happen?
Authentication should be set successfully. I've looked at old logs and it looks like this didn't work before as well, however now there is new output about which command arguments specifically failed.
Can you share any logs, error output, etc.?
Checking for existing aad connections
Could not configure authentication connection automatically.
There was an error while executing the following command:
az bot authsetting list -n -g --output json
ERROR: az bot authsetting list: error: argument --name/-n: expected one argument
usage: az bot authsetting list [-h] [--verbose] [--debug]
[--output {json,jsonc,table,tsv,yaml,none}]
[--query JMESPATH]
[--subscription _SUBSCRIPTION] --resource-group
RESOURCE_GROUP_NAME --name NAME
Any screenshots or additional context?
I can follow up with specific builds that show this error if that helps
Hi @ryanlengel! We managed to reproduce your scenario and noticed that it's related to the value of botWebAppName and the resourceGroupName of the appsettings.json file.
We came up with some questions to validate with you:
- Can you check that you are using the latest version of Botskills CLI Tool in your build pipeline?
- Can you check if the
botWebAppNameand theresourceGroupNameare being placed in theappsettings.jsonafter being deployed to Azure? Those values are read from the appsettings.json file by the tool during the execution of the connect command
I'm using the latest Botskills CLI, but am not using botWebAppName and resourceGroupName. I will test with that and follow up!
@dfavretto thanks! That worked locally, it is still failing in my build. I think it is related to either the warning formatting or that the command uses output json
I've filed an issue at microsoft/botbuilder-tools#1393
Hi @ryanlengel, sorry for the delay. In the error that you have attached, we see empty values in the -n and -g arguments of the az bot command.
- Can you verify if you have the botWebAppName and resourceGroupName properties in the
template.jsonfile of the Virtual Assistant? - Can you verify if those values are filled after the deployment (execution of deploy.ps1) in the
appsettings.jsonfile?
I'm using the latest Botskills CLI, but am not using botWebAppName and resourceGroupName. I will test with that and follow up!
The latest version Botskills CLI uses botWebAppName and resourceGroupName from the appsettings.json file, filling those properties during the deployment of the Virtual Assistant. Those properties are needed in the connect and update command.
@dfavretto thanks! That worked locally, it is still failing in my build. I think it is related to either the warning formatting or that the command uses output json I've filed an issue at microsoft/botbuilder-tools#1393
By default, the output of the az commands is json, but it could be customized as a user's configuration so we forced them to be a json adding --output json in order to be transformed in an interface or in a class correctly.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
@Batta32 were you able to repro the problem described in https://github.com/microsoft/botbuilder-tools/issues/1393?
I think this would be a popular issue if the problem was widespread, but haven't seen more tickets from users.
@ryanlengel, @lauren-mills is this issue still happening?
The authentication process was deprecated in [email protected]. At this point, Skills performs their own authentication and it's not necessary to work together with the Virtual Assistant to retrieve the tokens.
The main problem of the issue microsoft/botbuilder-tools#1393 is when any az bot command is executed as part of some code, it will fail because the format of the warning message could not be parse to a JSON one.