Forum Discussion
Rajesh Lohar
Jul 16, 2020Copper Contributor
Authenticate a user in MS teams custom app using asp.net and c#
Hi, I am working on a custom app for MS teams. It is not a bot but it is a tab app. I need to authenticate logged in user to MS teams using c#. Please let me know how to authenticate user and show ...
gk_vasudev
Jul 16, 2020Brass Contributor
Hi Rajesh Lohar
Use REST API service provided by Microsoft inside your application.
you can authenticate the user and and fetch user details using API.
Any services , be it Tabs, Bots etc., everything uses the same authentication process.
You can use the following links to get more idea of how to do it.
https://www.c-sharpcorner.com/article/authentication-with-office-365-in-C-Sharp/
https://github.com/microsoftgraph/aspnet-snippets-sample
cheers.
Rajesh Lohar
Jul 16, 2020Copper Contributor
Hi gk_vasudev ,
Thank you so much for your reply.
Is it possible that user is logged in to MS teams already so it can auto login to custom app pages using same credentials?
As per your answer, user has to login by his Office 365 credentials again in the app.
Thanks,