Microsoft Entra External ID custom URL domain: esctx cookies accumulate and cause HTTP 431 on a subdomain

Boukhriss Ouchab, Marouane 0 Reputation points
2026-10-27T14:19:29.9566667+00:00

We use a custom URL domain for our Entra External ID tenant (login.contoso.com, through Azure Front Door). Our own web page for creating passkeys runs on a subdomain, account.login.contoso.com, because WebAuthn requires it to be within the passkey's relying party ID.

The sign-in pages set cookies named esctx-<random> with Domain=.login.contoso.com, so the browser also sends them to our subdomain. Each sign-in adds a new one (about 0.8 KB), and none is removed until the browser closes. After roughly a dozen sign-ins in one session, requests to our subdomain exceed the usual 16 KB header limit and fail with HTTP 431.

Is this expected? Is there a setting that keeps these cookies host-only or expires old ones?

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.