Is it possible to get user email from MS Teams with a Bot using SDK4?

前端 未结 2 1758
孤街浪徒
孤街浪徒 2020-12-21 06:50

I\'m using C# and Bot Framework SDK4 and need to get the user email from a 1:1 chat with my bot. Is it possible? All I can seem to get is ID and full name.

I have tr

2条回答
  •  南方客
    南方客 (楼主)
    2020-12-21 07:05

    Private async  Task GetUserProfile(TurnContext context,CancellationToken cancellationToken)
    {
        BotFrameworkAdapter botAdapter = (BotFrameworkAdapter)context.Adapter;           
        var conversation = await botAdapter.GetConversationMembersAsync(context, cancellationToken);
    }
    

    You can visit - How get user email from MS Teams with a Bot using SDK4?

提交回复
热议问题