Forum Discussion
mukesh-pando
Mar 30, 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 workaround for this?
Need to find the user name or user email with which we can find the user uniquely.
- Sayali-MSFTMicrosoftmukesh-pando - Thanks for reporting your issue.
We will check this at our end and will get back to you. - Sayali-MSFTMicrosoft
mukesh-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)