OfficeDev / Microsoft-Teams-Samples

Welcome to the Microsoft Teams samples repository. Here you will find task-focused samples in C#, JavaScript and TypeScript to help you get started with the Microsoft Teams App!
MIT License
908 stars 731 forks source link

Tab authentication with thirdparty identity provider, calling backend with cookie #1278

Open chandraarora opened 1 month ago

chandraarora commented 1 month ago

Hi

I am not able to send cookie from ny teams tab app to my backend server with cookie. I am trying to avoid to get the access token inside the teams app rather sending the auth cookie to call backend api. All your example are getting the token client side. would it be possible to share a sample for this? Please see the drawing and i am not able to get success at step 7. Is this possible using teams app?

image

Best regards Chandra

Prasad-MSFT commented 1 month ago

Thanks for raising your issue. We will check this at our end and will update you accordingly.

Prasad-MSFT commented 1 month ago

@chandraarora - We are having trouble reproducing the issue. Could you please share a network trace showing the cookies getting dropped?

chandraarora commented 1 month ago

Which sample did you try for my use case, I can not find as a sample for BFF external IDP, which sample will fit to my requirements

Sent from Outlook for iOShttps://aka.ms/o0ukef


From: Prasad-MSFT @.> Sent: Wednesday, May 29, 2024 8:20:18 AM To: OfficeDev/Microsoft-Teams-Samples @.> Cc: Chandra Arora @.>; Mention @.> Subject: Re: [OfficeDev/Microsoft-Teams-Samples] Tab authentication with thirdparty identity provider, calling backend with cookie (Issue #1278)

@chandraarorahttps://github.com/chandraarora - We are having trouble reproducing the issue. Could you please share a network trace showing the cookies getting dropped?

— Reply to this email directly, view it on GitHubhttps://github.com/OfficeDev/Microsoft-Teams-Samples/issues/1278#issuecomment-2136615477, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIRM7FXH4PIAOTO7P5LQLODZEVXSFAVCNFSM6AAAAABIKZ7LUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZWGYYTKNBXG4. You are receiving this because you were mentioned.Message ID: @.***>

Prasad-MSFT commented 1 month ago

@chandraarora - Exactly the same problem with us. We checked this sample repo and having trouble to repro your scenario as there is no such sample that fits the requirement.

chandraarora commented 1 month ago

Would it be good to have authentication over cookie to avoid token in Teams. It will be good to have a sample on this. I think some teams app done this.

Sent from Outlook for iOShttps://aka.ms/o0ukef


From: Prasad-MSFT @.> Sent: Wednesday, May 29, 2024 8:27:20 AM To: OfficeDev/Microsoft-Teams-Samples @.> Cc: Chandra Arora @.>; Mention @.> Subject: Re: [OfficeDev/Microsoft-Teams-Samples] Tab authentication with thirdparty identity provider, calling backend with cookie (Issue #1278)

@chandraarorahttps://github.com/chandraarora - Exactly the same problem with us. We checked thishttps://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples sample repo and having trouble to repro your scenario as there is no such sample that fits the requirement.

— Reply to this email directly, view it on GitHubhttps://github.com/OfficeDev/Microsoft-Teams-Samples/issues/1278#issuecomment-2136632886, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIRM7FST6ZSAL2KQZ7OMII3ZEVYMRAVCNFSM6AAAAABIKZ7LUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZWGYZTEOBYGY. You are receiving this because you were mentioned.Message ID: @.***>

Prasad-MSFT commented 2 weeks ago

You can refer this sample as a starting point: https://github.com/ydogandjiev/microsoft-teams-cookie-app

You can sideload it via the app package found here: https://github.com/ydogandjiev/microsoft-teams-cookie-app/raw/master/package/cookie-app.zip