Forum Discussion

ivjunka1760's avatar
ivjunka1760
Copper Contributor
Jun 08, 2023

Issue with authentication in Teams Personal tab application

Hi,
I have an issue with authentication in my Teams Personal tab application. There is some weird behaviour with authentication flow when I`m testing my app in Teams Desktop Client (web-based client works just fine).
So I am using .netcore web application with IdentityServer4 to handle authentication. I have a few identity providers (google etc.).

 

The authentication flow is as follows:

1. User is trying to access my applicaton.
2. If user is authenticaten (auth cookies are present) then it`s just getting redirected to the application.
3. If user isn`t authenticated then redirect to the login page.

 

Is pretty straitforward and have been working perfectly so far. It is also working properly for my Teams personal app if I am working with it via my browser (chrome/edge/firefox).
The problem starts when I`m trying to login from my Teams Desktop Client. I am always getting redirected to my login page whether I haved already logged in or not.
My first thought was that the Desktop is just doesn`t works with cookies but after some research I found out that Desktop Client is actually a stripped out browser.
I have been trying to fix this problem for days but without luck. Have someone experienced something similar?

Resources