How to Enable Sitecore Analytics on Azure Using ARM Templates


Debugging Sitecore Analytics on Azure: Lessons From a Real Deployment



When deploying a Sitecore solution on Azure PaaS, most teams expect Sitecore Analytics to work out-of-the-box—especially when the deployment follows the standard ARM templates or the Sitecore Azure Toolkit.

But during one of our recent deployments, we noticed that Sitecore Analytics was not working at all, even though the application was healthy, CD/CM were synced, and the xConnect endpoints were reachable.

After investigation, we found the root cause:

allowInvalidClientCertificates was not enabled in our ARM template.

And enabling this single configuration value instantly fixed Analytics.

This blog walks you through the issue, symptoms, root cause, and how re-deploying the ARM template with the correct setting resolved everything.


The Problem: Analytics Events Not Being Recorded

Even though:

  • xConnect services were up

  • XP roles were able to communicate

  • CM/CD could reach the xConnect endpoint

  • No major errors appeared in Sitecore logs

Analytics simply was not recording any interactions.

No new contacts, no page events, no engagement value.

On a deeper look, the xConnect log on the XP XConnect Search & Collection role showed errors such as:

The client certificate provided is not trusted.

But in our environment setup, we were not using custom client certificates — Azure manages them internally for Sitecore PaaS.

So why was xConnect rejecting internal traffic?




Root Cause: allowInvalidClientCertificates Was Missing

In Azure PaaS Sitecore deployments, some internal components communicate using automatically generated certificates.
These certificates are valid but not always evaluated as trusted by xConnect without a specific configuration flag.

That flag is:

"allowInvalidClientCertificates": true


When this setting is missing or set to false, xConnect rejects internal calls used for tracking and analytics.

This results in:

  • No analytics data stored

  • No interactions tracked

  • xConnect responding with certificate validation errors

  • Sitecore not showing any Experience Analytics data

This setting is normally included in standard Sitecore ARM deployments—but in our case, it was missing from a custom template.


Once this was added and we redeployed:



  1. xConnect accepted the internal client certificates
  2. Tracking events started flowing
  3. Analytics began processing interactions normally

Key Takeaways

  1. Sitecore XP on Azure may require allowInvalidClientCertificates = true for proper xConnect communication.
  2. If analytics is not working and logs show certificate errors, check this setting first
  3. The fix requires a redeploy, not just a restart.
  4. Custom ARM templates often miss this setting—always validate configuration against Sitecore’s baseline templates.
  5. This setting is safe on Azure PaaS because communication happens inside secure Azure-managed infrastructure.


Comments

Popular posts from this blog

XM Cloud Basics – Part 1

Sitecore 10.4 + Docker + Next.js: A Complete Setup Guide for JSS Developers

Deploying Next.js + Sitecore JSS: Real-World Azure PaaS Setup