I have enabled the connected service in my Cortana channel (Microsoft) and got the token to the BOT framework. Now, I want to retrieve the user details from the token by using the registered client id and secret
Sample code in BOT framework:
var authInfo = ((Activity)context.Activity).Entities.FirstOrDefault(e => e.Type.Equals("AuthorizationToken"));
var token = authInfo.Properties["token"].ToString();
Any thoughts?
Check BotAuth out. You can retrieve the token choosing a provider:
If you just want to retrieve user name and ID you can get it from userData object:
https://github.com/Microsoft/BotBuilder/issues/3242