Why Azure Bot Service and Safari do not get along

๎€ฃ

December 11 2016

The troubled relationship between Azure Bot Service and Safari is a neat illustration of what developers face in an era of tighter privacy protection. The incompatibility is not an isolated bug but part of a deep transformation of the web, where browsers, Safari first among them, keep hardening their policies on cookies. Development teams using Azure Bot Service often discover with some frustration that their chatbot works perfectly in Chrome yet stubbornly refuses to cooperate in Safari.

How Safari started the third-party cookie war

Apple's Safari opened a new chapter in online privacy protection with its Intelligent Tracking Prevention feature, usually shortened to ITP. The technology blocks third-party cookies by default, those small files that websites use to follow users across different domains. Apple justifies the aggressive stance by the need to protect its users from intrusive advertising tracking and excessive collection of personal data.

The intention behind ITP deserves recognition. The web really had turned into an enormous surveillance machine where every click, every page visited, every second spent on a site fed extremely detailed user profiles. Advertising networks used third-party cookies to follow people from one end of the internet to the other, building behavioural files that make uncomfortable reading. Safari decided to call a halt, blocking those cookies by default from 2017 onwards.

That protective policy came with considerable collateral damage. Many legitimate web features relied on the same third-party cookies, not to spy on users but to deliver something useful. Single sign-on systems that let you log in once and reach several services, embedded video players, chat widgets and, precisely, chatbots such as Azure Bot Service suddenly stopped working in Safari.

Firefox and Brave quickly followed Safari, implementing their own third-party cookie blocking. Chrome announced its intention to take the same route, but Google pushed the deadline back several times before abandoning the plan altogether in 2025: third-party cookies remain enabled by default in Chrome, and the Privacy Sandbox programme that was meant to replace them has since been largely wound down. That does nothing to change Safari's behaviour, so the problems encountered today with Azure Bot Service still point to the direction the rest of the web is taking.

Why Azure Bot Service depends on third-party cookies

To understand the conflict between Azure Bot Service and Safari, you have to look at how embedded web chatbots work technically. When a website embeds an Azure chatbot, it typically runs inside an iframe, an invisible frame that displays content coming from another domain. The chatbot itself runs on Microsoft servers, at an address different from the site hosting it.

That architecture automatically creates a third-party context. When a user interacts with the chatbot on example.com, requests go out to botservice.azure.com. To keep the conversation going, identify the user and manage session state, Azure Bot Service uses cookies. From the browser's point of view, those cookies come from a third-party domain relative to the main site, which trips Safari's protections immediately.

The problematic cookie that development teams first reported did indeed exceed what Safari allows. Browsers impose strict limits on cookie size, generally around 4 KB per individual cookie. The Azure Bot Service developers were probably storing fairly bulky session information in that cookie, beyond acceptable thresholds. Chrome tolerated the excess, so the problem went unnoticed there. Safari, with its stricter rules, simply rejected the cookie.

Relying on third-party cookies to manage user sessions is an understandable architectural choice that has become a problem. Alternatives exist but require significant structural change. Storing session state server-side and using lighter session identifiers in cookies would cut the amount of data transmitted. Setting up custom domains where the chatbot shares the same root domain as the parent site would remove the third-party cookie issue entirely.

How to diagnose problems between Azure Bot Service and Safari

Developers faced with an Azure chatbot that refuses to work in Safari need a methodical approach to diagnosis. The first step is to check whether the problem affects Safari alone or other browsers too. Opening the same site in Chrome, Firefox and Edge quickly shows whether Safari is the only culprit or whether the bot is misbehaving more broadly.

The Web Chat built into the Azure portal is a valuable test environment for isolating problems. Opening the bot resource in the Azure portal, selecting "Test in Web Chat" and sending a few messages confirms whether the bot itself is working. If the bot answers normally in that controlled environment but fails in Safari in production, the problem almost certainly comes from cookies or from the browser's security policy.

Safari's developer tools often reveal useful clues. Opening the web inspector with Cmd+Option+I and moving to the Storage tab shows which cookies are actually being kept. A complete absence of cookies from the Azure Bot Service domain confirms that Safari is blocking them. The Console tab also displays possible error messages about rejected cookies or failed CORS requests.

Testing the bot endpoint directly helps separate connectivity problems from cookie problems. Copying the messaging endpoint URL from the bot overview and pasting it into the browser should return an HTTP error 404 or 405, which shows the server is reachable even though it refuses to answer a plain GET request. A "this site can't be reached" error suggests instead that the bot is completely offline and needs redeploying.

Why Azure Bot Service and Safari do not get along

Which fixes make Azure Bot Service work in Safari

Several strategies can restore functionality despite the incompatibility between Azure Bot Service and Safari. The most elegant, and also the most involved, is to set up a custom domain for the chatbot. Configuring the bot to be reachable through chat.example.com rather than the generic Azure URL means the browser no longer treats the cookies as third-party, as long as the main site runs on www.example.com. The approach does require specific DNS configuration and possibly a reverse proxy.

Microsoft has gradually improved Azure Bot Service to cope better with modern cookie constraints. Recent versions of the Bot Framework SDK include options to minimise cookie use and favour other state management mechanisms. Updating to the latest SDK versions is therefore a recommended first step. Microsoft's official documentation now addresses third-party cookie blocking explicitly and suggests alternative configurations.

Authentication based on JWT tokens rather than cookies is a viable technical alternative. This approach stores credentials in the browser's local storage or in application memory rather than in cookies. The tokens are then included in the HTTP headers of requests sent to the bot. The method bypasses third-party cookie restrictions entirely while preserving security and session continuity.

Where these technical solutions turn out to be too complex or too expensive to implement straight away, telling Safari users clearly about the limitation is the minimum acceptable measure. Showing a message explaining that the chatbot works better in Chrome or Firefox lets users make an informed choice. The pragmatic approach acknowledges the problem without solving it, but it does spare people the frustration of a service that looks broken with no explanation.

How other chatbot services handle the problem

Azure Bot Service is not alone in facing Safari's restrictions on third-party cookies. Every embedded chatbot service runs into similar difficulties, and looking at how the competition solves them is instructive. Intercom, one of the most popular customer messaging platforms, moved to an architecture without third-party cookies as early as 2019, anticipating the browser restrictions to come.

Zendesk Chat went for a hybrid approach that combines several techniques depending on the browser detected. In Safari the service leans on local storage and authentication tokens. In more permissive browsers it keeps using cookies for their simplicity and proven reliability. That adaptive strategy keeps the user experience consistent while respecting the specific constraints of each browser.

Open source solutions such as Botpress or Rasa give total control over the deployment architecture, so developers can implement exactly the state management strategy that suits them. The flexibility costs something in installation and maintenance complexity, but it removes any dependence on architectural choices imposed by a cloud provider. For organisations with sufficient technical resources, hosting their own chatbot solution sidesteps third-party cookie problems completely.

Facebook Messenger and WhatsApp Business, used by many companies as a chatbot interface, largely escape these issues because they run as native applications or through their own web domains. Integrating with those platforms is an interesting alternative for companies that want to deploy chatbots without hitting browser limitations. The trade-off is weaker direct integration with the company's own website.

Why this problem will get worse before it gets better

The trajectory of the web industry suggests that compatibility problems between Azure Bot Service and Safari are a preview of wider difficulties. Chrome, which still carries the overwhelming majority of web traffic, has stepped back from removing third-party cookies, so the pressure there has eased for now. Safari, Firefox and Brave have not moved an inch, however, and they still represent a substantial share of visitors on many sites, particularly on mobile.

Data protection regulations such as the GDPR in Europe and the CCPA in California add their own pressure towards doing away with third-party cookies. These laws impose strict consent and transparency obligations around user tracking. Even if the cookies used by Azure Bot Service are not there for advertising purposes, they technically fall within the scope of those regulations as soon as they cross domain boundaries โ€“ a point worth reading alongside our overview of how cyberattacks and web security have evolved.

Web developers should therefore plan for a future where third-party cookies are the exception rather than the norm. Continuing to build services that depend on a dying technology amounts to digging your own technical grave. Modern chatbot and web application architectures need alternative state management and authentication mechanisms designed in from the start, so they work in restrictive environments.

This move towards a more privacy-respecting web, uncomfortable as it is for developers used to the old methods, ultimately benefits users. Third-party cookies did enable massive abuses of surveillance and profiling. Their disappearance will force the industry to invent more respectful and potentially more robust solutions. Azure Bot Service and its competitors will have to adapt their architectures, but the changes will probably produce better services in the long run.

How to test your bot properly across browsers

Developers working with Azure Bot Service need rigorous cross-browser testing in their workflow. Waiting for users to report Safari problems means discovering bugs in production, a deplorable practice that erodes trust and customer satisfaction. Setting up a routine of systematic tests in Safari, Chrome, Firefox and Edge before every major deployment prevents those embarrassing situations.

Automated testing tools such as Selenium or Playwright let you script interaction scenarios with the chatbot and run them in different browsers. These tests check not only that the bot answers correctly but that conversations persist properly between messages, that authentication works and that the necessary cookies are actually accepted. Automating those checks cuts the risk of regression during updates dramatically, and they sit naturally alongside the rest of the toolkit a web developer keeps close at hand.

Cloud testing services such as BrowserStack or Sauce Labs give access to hundreds of browser and operating system combinations without complex local infrastructure. Testing Azure Bot Service on the current Safari release under macOS, on mobile Safari under iOS, and on several Chrome versions under Windows quickly reveals specific incompatibilities. These platforms even record videos of the test sessions, which makes diagnosing subtle problems easier.

Simulating real usage conditions enriches the tests further. Enabling popular ad blockers such as uBlock Origin, testing with various privacy protection levels configured in the browsers, and checking behaviour in private browsing all uncover problems that standard tests miss. Real users browse in varied environments configured in unpredictable ways; the tests have to reflect that diversity.

What to do when Azure Bot Service simply refuses to work

Despite every diagnostic and configuration effort, some setups stay hopelessly broken in Safari with Azure Bot Service. When all the technical fixes fail, pragmatic workarounds at least keep a minimum of functionality. Detecting Safari on the client side and showing an "Open in Chrome" button gives users a clear way out. The approach acknowledges the problem instead of pretending it does not exist.

Offering an alternative contact channel preserves the possibility of interaction even when the web chatbot fails. A simple contact form, a phone number displayed clearly or a link to an account where users can ask their questions makes sure no customer is left stuck. That redundancy across communication channels is good practice in general, not just a stopgap for browser problems.

Some organisations choose to disable the chatbot in Safari outright rather than leave it half-broken. The decision is radical but honest, and it avoids frustrating users with a service that looks broken. A message explaining that "our virtual assistant is unfortunately not compatible with Safari because of technical limitations, please use Chrome, Firefox or Edge" informs people clearly instead of leaving them wrestling with an unresponsive interface.

In critical cases where the chatbot is an essential service rather than a nice extra, investing in an alternative chatbot solution that works in Safari becomes necessary. That migration certainly costs time and money, but keeping a fundamentally broken service for a significant share of users causes greater commercial and reputational damage over time. Sometimes recognising that a technology does not fit is the wisest decision available.

Training resources such as those offered by Itamde for learning web development and cloud technologies help developers acquire the skills needed to diagnose and solve these complex integration problems. Understanding the fundamentals of cookies, web state management and browser security policies turns mysterious problems into technical questions that can be addressed.

The difficult relationship between Azure Bot Service and Safari ultimately stands for the wider tension between technical innovation, privacy protection and web compatibility. No magic solution exists, but a solid understanding of what is at stake technically lets developers navigate these murky waters and build robust user experiences despite the growing constraints of modern browsers.

Recent Posts

Recent Comments

"

Itamde is also an online programming school.

Itamde

Learn what you want, at your own pace

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

You may also be interested in...

Monogame E-learning

MonoGame: build a 2D game in C# with the successor to XNA

If you have ever touched XNA, you know the pattern: one game class, one method that updates the logic, one method that draws, all of it running in C#. MonoGame keeps that exact idea and carries it further than Microsoft did. The framework is open source, it runs on...

Stay up to date with the latest news and developments

Access restricted content

Discover behind-the-scenes details of our projects, exclusive resources, and the progress of our creations in real time.

Sign up for our newsletter

Receive our news, creative insights, and updates from the studio directly in your inbox.

Follow us

Join our community on social media to follow our daily projects and interact with us.