We are using Bot Framework V4 (Typescript), and we are referring "https://github.com/microsoft/BotFramework-WebChat/tree/master/samples/19.a.single-sign-on-for-enterprise-apps" for achieving SSO using AAD.
We have below questions:
We wanted to know that how does the token gets set in the bot adapter currently, it would be great if we get the proper examples on setting the token to the bot adapter which will allow the user to sign out using the built in adapter.signOut function from the bot framework.
Thanks in advance Edward
You can see here that in that single sign-on scenario, the access token is sent to the bot in each activity's channel data:
// Piggyback the access token on every outgoing activity.
The bot just uses the token from each activity and therefore doesn't need to store it:
const { activity: { channelData: { oauthAccessToken } = {}, text } } = context;