Forum Discussion
mukesh-pando
Mar 29, 2023Copper Contributor
Find user on incoming web-hooks
We are also trying to post a message with incoming web-hook to a teams channel which has actions on it. We need to find the user who took action on a specific message. Is there any way to implement a...
Sayali-MSFT
Microsoft
Mar 31, 2023mukesh-pando -
Using Incoming webhook you cannot find the username or user email.
Currently, this is not possible scenario.
If you can send the adaptive card through Bot then you will get the user value.
protected override async Task OnMessageActivityAsync(ITurnContext<IMessageActivity> turnContext, CancellationToken cancellationToken)
{
// Gets the account of a single conversation member.
// This works in one-on-one, group, and team scoped conversations.
var member = await TeamsInfo.GetMemberAsync(turnContext, turnContext.Activity.From.Id, cancellationToken);
}
Reference sample- Microsoft-Teams-Samples/DialogBot.cs at main · OfficeDev/Microsoft-Teams-Samples (github.com)