Search code examples
microsoft-teamsasp.net-core-identity

ASP.NET Core server side Identity in Microsoft Teams


What's the correct way to use server side ASP.NET Core Identity in a Teams Web App? I have an ASP.NET Core application (Razor Pages) with a classic Cookie Authentication. I need to show that application in a Teams Tab.

I managed to show the WebApp in the Teams Tab (the anonymous pages), but when the user access the protected pages, the page redirect to Microsoft Login do not work.

The samples in Microsoft Docs show how to use client side OAuth2 authentication (with MicrosoftTeams.js) but what's the correct way to authenticate the user server side?


Solution

  • Currently teams does not support complete server side authentication. Teams uses the Microsoft libraries which calls client. You can get the Auth token using Microsoft libraries and do the further process on server side authentication. Teams support client side Authentication,This is by design.