How to debug locally a Teams application (ASP.NET Core / React.js) when using Teams Tab SSO ?

Alexandre 346 Reputation points
2020-07-02T11:52:18.827+00:00

I have a Teams application composed of a tab in React.js and an API in ASP.NET Core 3.1 which are deployed in an App Service in Azure.

I configured Teams Tab SSO to hide the tab content from any user not authenticated as I want my application to be only available in Teams where users are already authenticated. However when I launch my application in debug locally, I won't be in a teams context so the front won't be able to retrieve a token hence I won't be able to see and debug my tab content which will be hidden.

Moreover I have configured authentication and authorization on my API with a simple policy that check the user is authenticated and has the scope access_user. But when debugging locally my front won't be able to authenticate to my API has I won't have the token from the teams context.

So the questions are :

  • How to handle local development and debugging when using Azure Ad authentication in a Teams Application ?
  • Is there a way to disable authentication, fake authentication or retrieve a valid token when doing local debugging ?
  • What is the best practice to handle such a scenario ?
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,451 questions
{count} votes