microsoft / BotBuilder-Samples

Welcome to the Bot Framework samples repository. Here you will find task-focused samples in C#, JavaScript/TypeScript, and Python to help you get started with the Bot Framework SDK!
https://github.com/Microsoft/botframework
MIT License
4.38k stars 4.88k forks source link

Azure Bot skill - userTokenClient.GetUserTokenAsync - Object reference not set to an instance of an object. #3743

Closed ShilpaSharePoint closed 2 years ago

ShilpaSharePoint commented 2 years ago

Hi,

I am working on the sample 'skills-sso-cloudadapter' from the link: https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/csharp_dotnetcore/82.skills-sso-cloudadapter Below method in 'SsoSkillDialog' class throws exception as Object reference not set to an instance of an object. await userTokenClient.GetUserTokenAsync

Does not get the token [Error] Microsoft.AspNetCore.Server.IIS.Core.IISHttpServer: Connection ID: An unhandled exception was thrown by the application. System.NullReferenceException: Object reference not set to an instance of an object.

I have followed all the instructions given in the readme file & created resources on Azure.

anishprasad01 commented 2 years ago

HI @ShilpaSharePoint,

There's probably something wrong with your configuration. As we are already discussing your difficulties with this sample on the other issue you opened, I'm going to close this in favor of that one, in order to keep things simple. There's a good chance both problems stem from the same cause.