How to Recover User Name in Botframework?

Asked

Viewed 38 times

1

What is the C# code to retrieve the user name during the conversation? Chat

1 answer

2

The documentation doesn’t help much but I think you’re looking for the property IDialogContext.Activity.From.Name.

private async Task MessageReceivedAsync(IDialogContext context, IAwaitable<object> result)
{
    string Nome_do_Usuario = context.Activity.From.Name;

}
  • It worked, Thank you Augusto Vasques!

  • Opa @Mateusrodrigues. If you solved your problem you could kindly accept Augusto’s answer as correct?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.