Getting 401 unauthorized error when calling skill bot from rootbot in Virtual assistant.
We are trying to create virtual assistant bot microsoft teams. When we are trying to send request to skill bot from root bot using SkillClient.PostActivityAsync method, while debugging request hits botcontroller of skill bot. But it return 401 unauthorized error. If we try same in local using bot framework emulator (without using app id and password) it is working as expected. Also we have entered all configurations in appsettings.json for rootbot except oauthConnections, tokenExchangeConfig this two values. Can you please help us with where we can get this values. And how we can resolve this unauthorized error?
@Utkarsh Patni (TATA CONSULTANCY SERVICES LTD) Have you checked if you missed any of the steps to setup authentication for the bots? Also, the missing connection string and tokens are generated if you setup your OAuth connection strings of both the bots.
The Bot Framework Emulator has its own authentication flow and its own tokens so you wouldn't really see an error while using the emulator for both the bots.
Sign in to comment
@romungi-MSFT I tried with the different simple skill bot, and it is working. The one I earlier using was having client app (for tabs and Messaging extensions) and additional authorization required for it. Is that a problem?
@Utkarsh Patni (TATA CONSULTANCY SERVICES LTD) That's great!! I think for the original bot you could add more context about the bot since it has a different setup and functionality. You could add an issue on the composer repo for advice or build on the basic skill bot to add the extensions and check.