botframework-solutions icon indicating copy to clipboard operation
botframework-solutions copied to clipboard

[CLI] Authentication is not configured from Skill->VA

Open ryanisgrig opened this issue 6 years ago • 7 comments

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

ryanisgrig avatar Dec 10 '19 23:12 ryanisgrig

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 botWebAppName and the resourceGroupName are being placed in the appsettings.json after being deployed to Azure? Those values are read from the appsettings.json file by the tool during the execution of the connect command

dfavretto avatar Dec 13 '19 21:12 dfavretto

I'm using the latest Botskills CLI, but am not using botWebAppName and resourceGroupName. I will test with that and follow up!

ryanisgrig avatar Dec 13 '19 22:12 ryanisgrig

@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

ryanisgrig avatar Dec 14 '19 00:12 ryanisgrig

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.

  1. Can you verify if you have the botWebAppName and resourceGroupName properties in the template.json file of the Virtual Assistant?
  2. Can you verify if those values are filled after the deployment (execution of deploy.ps1) in the appsettings.json file?

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.

Batta32 avatar Dec 19 '19 14:12 Batta32

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

github-actions[bot] avatar Jan 19 '20 01:01 github-actions[bot]

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

stevengum avatar Feb 25 '20 22:02 stevengum

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.

DiegoCardozo94 avatar Feb 26 '20 20:02 DiegoCardozo94