I think the best way is to find the Activity Type if its event type user have interacted else it’s an automatic signin. You can reverify the connection just established by checking the value of key connectionName in Activity.Value. The following code will help you.
Distinguish between the OAuth login with and without user interaction
Kokul Jose
316
Reputation points
I would like to give a sign in successful message if user have clicked the sign card to sign in else i do not need the same. So here i need to identify that how the sign in happened. How can i distinguish between the two types of activities in bot framework?
Accepted answer
1 additional answer
Sort by: Most helpful
-
Destin Joy 1,871 Reputation points
2020-08-08T17:30:57.147+00:00 string output = JsonConvert.SerializeObject(stepContext.Context.Activity.Value, Formatting.Indented);
if (stepContext.Context.Activity.Type is "event")
{ var conName = JsonConvert.DeserializeObject<JObject>(output)["connectionName"].ToString();