microsoft / microsoft/ApplicationInsights-JS
Is there a suggested method for dealing with browsers disallowing third party cookies without disabling cookies altogether?
- Dominant language
- TypeScript
- Stars
- 685
- Forks
- 261
- Avg merge
- 21h 33m
- Merged PRs (30d)
- 5
Description
We have an angular application using Application Insights that we're displaying on another site via an iframe and both Chrome and Firefox are warning that in future versions they will be dropping support for third party cookies and blocking the ai_user and ai_session cookies entirely.
Screenshot from firefox:

Chrome:

We have this same issue with our identity related cookies on this embedded site, but we could fix that by adding the Partitioned attributes to our cookies ([google docs](https://developers.google.com/privacy-sandbox/3pcd/chips), [mozilla docs](https://developer.mozilla.org/en-US/docs/Web/Privacy/Privacy_sandbox/Partitioned_cookies)) when they're initially written, but it doesn't seem like Application Insights has hooks for that currently
Is there any guidance on how we can handle this now or any features in the pipeline that would allow us to handle this situation without disabling the user tracking cookies entirely?
**Steps to Reproduce**
1. Host two sites with different domains (A, B)
2. Set up application insights on site B
3. Display site B within site A via an iframe
4. See warnings in latest versions of Firefox and Chrome with default security settings
Contributor guide
Research direction
The issue names no source files or tests; start with the Application Insights setup on site B and reproduce it inside a cross-site iframe using current Chrome and Firefox. Review the SDK's cookie configuration alongside the linked CHIPS guidance; done means documented guidance or a supported approach that avoids disabling tracking cookies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- analytics, frontend, observability, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100