How to debug locally a Teams application (ASP.NET Core / React.js) when using Teams Tab SSO ?
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 ?