Search with messaging extensions to get searched user details

%3CLINGO-SUB%20id%3D%22lingo-sub-1885083%22%20slang%3D%22en-US%22%3ESearch%20with%20messaging%20extensions%20to%20get%20searched%20user%20details%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1885083%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Team%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20could%20like%20to%20know%20how%20to%20get%20the%20searched%20user%20details%20(means%20which%20user%20searching%20for%20data)%20in%20%22Search%20with%20message%20extension%22%2C%20which%20I%20implemented%20like%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fresources%2Fmessaging-extension-v3%2Fsearch-extensions%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fresources%2Fmessaging-extension-v3%2Fsearch-extensions%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eusing%20C%23%2C%20same%20as%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2FBotBuilder-Samples%2Ftree%2Fmain%2Fsamples%2Fcsharp_dotnetcore%2F50.teams-messaging-extensions-search%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fmicrosoft%2FBotBuilder-Samples%2Ftree%2Fmain%2Fsamples%2Fcsharp_dotnetcore%2F50.teams-messaging-extensions-search%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20I%20tried%20these%20all%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fbots%2Fhow-to%2Fget-teams-context%3Ftabs%3Ddotnet%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fbots%2Fhow-to%2Fget-teams-context%3Ftabs%3Ddotnet%3C%2FA%3E%26nbsp%3Bwhich%20are%20showing%20forbidden%20or%20object%20not%20set%20to%20instance%20of%20object.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20to%20user%20details%20in%20C%23%20for%20search%20based%20messaging%20extension%20%3F%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%26nbsp%3B%3C%2FP%3E%3CP%3ESurya.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1885083%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EBots%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EConversations%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

Hello Team,

 

I would like to know how to get the searched user details (means which user searching for data) in "Search with message extension", which I implemented like https://docs.microsoft.com/en-us/microsoftteams/platform/resources/messaging-extension-v3/search-ext...

 

using C#, same as https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/csharp_dotnetcore/50.teams-messagi...

 

and I tried these all https://docs.microsoft.com/en-us/microsoftteams/platform/bots/how-to/get-teams-context?tabs=dotnet which are showing forbidden or object not set to instance of object.

 

How to get user details in C# for search based messaging extension ?? I required userPrincipalName

 

Thanks, 

Surya.

0 Replies