Microsoft Tech Community Live:  Microsoft Teams Edition
November 09, 2021, 08:00 AM - 12:00 PM (PST)
SOLVED

How to enable cookies & cross site tracking in Teams IOS App

%3CLINGO-SUB%20id%3D%22lingo-sub-2813476%22%20slang%3D%22en-US%22%3EHow%20to%20enable%20cookies%20%26amp%3B%20cross%20site%20tracking%20in%20Teams%20IOS%20App%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2813476%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20developing%20an%20app%20for%20Microsoft%20Teams.%20The%20app%20includes%20a%20personal%20tab%20(static)%20tab%20which%20displays%20an%20iframe%20from%20a%20different%20domain%20to%20achieve%20some%20functionality%20within%20the%20personal%20tab.%20The%20iframe%20displays%20well%20in%20the%20Desktop%20client%2C%20web%20client%20and%20in%20the%20Android%20mobile%20device%20of%20the%20teams.%20When%20it%20comes%20to%20the%20Teams%20IOS%20App%2C%20the%20%3CSTRONG%3Eiframe%3C%2FSTRONG%3E%20could%20not%20load%20because%20it%20needs%20cookies%20functionality.%20It%20seems%20the%20teams%20IOS%20app%20prevents%20the%20cookies%20%26amp%3B%20cross%20site%20tracking.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20are%20the%20options%20I%20tried%20which%20did%20not%20work%3A%3C%2FP%3E%3CP%3E1.%20Enabled%20safari%20as%20my%20default%20browser%20and%20enabled%20cookies%20%26amp%3B%20cross%20site%20tracking%20in%20IOS%20(Iphone)%20safari%20settings.%3C%2FP%3E%3CP%20class%3D%22%22%3E2.%20Enabled%20chrome%20as%20my%20default%20browser%20and%20enabled%20cookies%20%26amp%3B%20cross%20site%20tracking%20in%20IOS%20(Iphone)%20safari%20settings.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENote%3A%20The%20same%20%3CSTRONG%3Eiframe%3C%2FSTRONG%3E%20URL%20is%20able%20to%20load%20and%20display%20in%20my%20iphone%20safari%20without%20any%20issues.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22%22%3EPlease%20assist%20if%20someone%20came%20across%20this%20issue%20in%20Teams%20IOS%20App%20and%20is%20there%20any%20setting%20I%20need%20to%20enable%20programatically.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2813476%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDevices%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2814041%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20enable%20cookies%20%26amp%3B%20cross%20site%20tracking%20in%20Teams%20IOS%20App%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2814041%22%20slang%3D%22en-US%22%3EWe%20are%20looking%20into%20this%2C%20we%20will%20get%20back%20to%20you%20soon.%3CBR%20%2F%3EThanks%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2814176%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20enable%20cookies%20%26amp%3B%20cross%20site%20tracking%20in%20Teams%20IOS%20App%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2814176%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1092873%22%20target%3D%22_blank%22%3E%40HunaidHanfee-MSFT%3C%2FA%3E%26nbsp%3Bis%20it%20just%20cookies%2C%20because%20I%20have%20the%20same%20problem%2C%20with%20my%20app.%20Loads%20everywhere%20but%20iOS%2C%20and%20no%20idea%20why.%20Has%20anyone%20else%20seen%20similar%20issues%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2822202%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20enable%20cookies%20%26amp%3B%20cross%20site%20tracking%20in%20Teams%20IOS%20App%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2822202%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1107375%22%20target%3D%22_blank%22%3E%40MarkFerraz%3C%2FA%3E%26nbsp%3B-%3CBR%20%2F%3EI%20tried%20setting%20up%20a%20cookie%20and%20accessing%20it%20and%20I%20didn't%20faced%20any%20issue.%20This%20how%20I%20did%20it%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3Edocument.cookie%20%3D%20%22testKey%3DtestValue%3BSameSite%3DNone%3BSecure%22%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CBR%20%2F%3ECould%20you%20please%20try%20with%20the%20same%20as%20I%20did.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I am developing an app for Microsoft Teams. The app includes a personal tab (static) tab which displays an iframe from a different domain to achieve some functionality within the personal tab. The iframe displays well in the Desktop client, web client and in the Android mobile device of the teams. When it comes to the Teams IOS App, the iframe could not load because it needs cookies functionality. It seems the teams IOS app prevents the cookies & cross site tracking.

 

Here are the options I tried which did not work:

1. Enabled safari as my default browser and enabled cookies & cross site tracking in IOS (Iphone) safari settings.

2. Enabled chrome as my default browser and enabled cookies & cross site tracking in IOS (Iphone) safari settings.

 

Note: The same iframe URL is able to load and display in my iphone safari without any issues.

 

Please assist if someone came across this issue in Teams IOS App and is there any setting I need to enable programatically.

7 Replies
We are looking into this, we will get back to you soon.
Thanks

@HunaidHanfee-MSFT is it just cookies, because I have the same problem, with my app. Loads everywhere but iOS, and no idea why. Has anyone else seen similar issues?

We are trying repro this at our end. I will get back to you with updates.
Thanks for understanding

@MarkFerraz -
I tried setting up a cookie and accessing it and I didn't faced any issue. This how I did it:

document.cookie = "testKey=testValue;SameSite=None;Secure";


Could you please try with the same as I did.

@HunaidHanfee-MSFT  thanks for your response. The iframe that I am trying to display in the Personal Tab is trying to set this automatically and it is 3rd party cookies. I can observe these 3rd party cookies are set automatically when I open the same app in MS Teams Desktop Client & Android. So with your option should I set it manually/explicitly so the Teams IOS does not block?

 

We are checking internally. I will get back to you soon,
best response confirmed by ChetanSharma-msft (Microsoft)
Solution

@krishnapilla -
The 3rd party cookies have been blocked by iOS starting iOS 14. This is not just for Teams, but for other apps as well. 
Here is the link  -
https://webkit.org/blog/10218/full-third-party-cookie-blocking-and-more/

You can try setting the cookie manually. Let us know if that helps you.

Thanks, 

Hunaid Hanfee

-------------------------------------------------------------

If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.