Microsoft Entra External ID: esctx Cookie Rejected by Chrome Due to Missing Secure Attribute During OIDC Federation

Dean Eveland 0 Reputation points
2026-11-21T00:34:16.6933333+00:00

We are implementing federated OpenID Connect (OIDC) authentication using Microsoft Entra External ID and a separate Microsoft Entra workforce tenant.

The authentication flow successfully redirects the browser to Microsoft Entra External ID, and the user successfully authenticates against the workforce tenant using credentials and multifactor authentication.

However, the authentication process does not complete. The browser remains on Microsoft's federation endpoint instead of returning to our application through the registered OIDC callback URL.

During investigation using Chrome Developer Tools, we identified a cookie issue associated with the Microsoft Entra External ID federation process.

Confirmed Browser Diagnostic

Chrome Developer Tools reports:

"Mark cross-site cookies as Secure to allow setting them in cross-site contexts."

The affected cookie has these attributes:

  • Cookie name: esctx (Microsoft-generated cookie with a unique suffix)

Domain: Microsoft's ciamlogin.com authentication domain

SameSite: None

Secure: Missing

Chrome explicitly identifies the cookie as blocked.

We inspected the actual HTTP Set-Cookie response header and confirmed that SameSite=None is present but the Secure attribute is absent.

The request is served over HTTPS.

Observed Authentication Sequence

Our application redirects the browser to Microsoft Entra External ID.

External ID redirects authentication to our workforce tenant.

The user successfully completes authentication and MFA.

The browser returns to the External ID federation endpoint.

The federation endpoint responds with HTTP 200 and HTML/JavaScript.

Chrome reports that the esctx cookie is rejected.

The browser remains on the federation endpoint, and our application's OIDC callback is not confirmed as reached.

Questions

Is the esctx cookie required to maintain the Microsoft Entra External ID federation transaction or protect its authentication state?

Is Microsoft Entra External ID expected to issue this cookie with SameSite=None; Secure when operating in a cross-site authentication context?

Is there a known issue in Microsoft Entra External ID where the esctx cookie is issued with SameSite=None but without Secure?

Could Chrome rejecting this cookie prevent completion of the federated authentication transaction or cause the browser to remain on the federation endpoint?

Is there a Microsoft-supported configuration change or service-side remediation for this behavior?

Are there additional diagnostic tools or logs that can identify why the federation transaction is not completing?

Additional Information

Authentication protocol: OpenID Connect (OIDC)

Identity provider: Microsoft Entra workforce tenant

Relying identity platform: Microsoft Entra External ID

Browser: Google Chrome, current version

Transport: HTTPS

Browser diagnostics: Chrome Developer Tools / Issues / Network

We have independently tested our application's OIDC implementation and its automated test suite passes.

We are trying to establish whether this is an External ID cookie-handling issue, an expected browser-security behavior, or a separate federation configuration problem.

**We would appreciate input from Microsoft Entra External ID engineers or others who have encountered this behavior in cross-tenant OIDC federation.**We are implementing federated OpenID Connect (OIDC) authentication using Microsoft Entra External ID and a separate Microsoft Entra workforce tenant.

The authentication flow successfully redirects the browser to Microsoft Entra External ID, and the user successfully authenticates against the workforce tenant using credentials and multifactor authentication.

However, the authentication process does not complete. The browser remains on Microsoft's federation endpoint instead of returning to our application through the registered OIDC callback URL.

During investigation using Chrome Developer Tools, we identified a cookie issue associated with the Microsoft Entra External ID federation process.

Confirmed Browser Diagnostic

Chrome Developer Tools reports:

"Mark cross-site cookies as Secure to allow setting them in cross-site contexts."

The affected cookie has these attributes:

Cookie name: esctx (Microsoft-generated cookie with a unique suffix)

Domain: Microsoft's ciamlogin.com authentication domain

SameSite: None

Secure: Missing

Chrome explicitly identifies the cookie as blocked.

We inspected the actual HTTP Set-Cookie response header and confirmed that SameSite=None is present but the Secure attribute is absent.

The request is served over HTTPS.

Observed Authentication Sequence

Our application redirects the browser to Microsoft Entra External ID.

External ID redirects authentication to our workforce tenant.

The user successfully completes authentication and MFA.

The browser returns to the External ID federation endpoint.

The federation endpoint responds with HTTP 200 and HTML/JavaScript.

Chrome reports that the esctx cookie is rejected.

The browser remains on the federation endpoint, and our application's OIDC callback is not confirmed as reached.

Questions

Is the esctx cookie required to maintain the Microsoft Entra External ID federation transaction or protect its authentication state?

Is Microsoft Entra External ID expected to issue this cookie with SameSite=None; Secure when operating in a cross-site authentication context?

Is there a known issue in Microsoft Entra External ID where the esctx cookie is issued with SameSite=None but without Secure?

Could Chrome rejecting this cookie prevent completion of the federated authentication transaction or cause the browser to remain on the federation endpoint?

Is there a Microsoft-supported configuration change or service-side remediation for this behavior?

Are there additional diagnostic tools or logs that can identify why the federation transaction is not completing?

Additional Information

Authentication protocol: OpenID Connect (OIDC)

Identity provider: Microsoft Entra workforce tenant

Relying identity platform: Microsoft Entra External ID

Browser: Google Chrome, current version

Transport: HTTPS

Browser diagnostics: Chrome Developer Tools / Issues / Network

We have independently tested our application's OIDC implementation and its automated test suite passes.

We are trying to establish whether this is an External ID cookie-handling issue, an expected browser-security behavior, or a separate federation configuration problem.

We would appreciate input from Microsoft Entra External ID engineers or others who have encountered this behavior in cross-tenant OIDC federation.

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

1 answer

Sort by: Most helpful
  1. AI answer

    2026-11-21T00:35:54.3733333+00:00

    Capture one complete failing transaction, correlate it with both tenants’ sign-in logs, and open a Microsoft Entra support request if ciamlogin.com consistently emits esctx with SameSite=None but no Secure, because no supported customer setting is documented for changing a cookie emitted by that Microsoft-hosted domain.

    • esctx is a Microsoft Entra session-context and CSRF-protection cookie. It binds a request to a browser instance to prevent replay and contains no user information.^1^
    • Chrome cross-site authentication requires cookies intended for cross-site use to follow the SameSite=None; Secure model. Microsoft documents that incorrect SameSite handling can break authentication flows.^2^
    • The documentation does not publish a product-specific guarantee describing the exact esctx attributes on every External ID federation response. However, the header you captured is incompatible with Chrome’s handling of SameSite=None.
    • Rejection of a transaction-state or CSRF cookie could prevent the federation continuation. The browser warning alone does not prove that this is the actual stopping condition; External ID can also return HTTP 200 HTML containing a federation validation error.
    • The current External ID known-issues article does not list a public issue specifically for ciamlogin.com, esctx, and a missing Secure attribute.^3^

    Your application cannot rewrite a Set-Cookie header issued for Microsoft’s ciamlogin.com domain. Do not attempt to weaken your application cookies or disable Chrome security controls as a production workaround.

    Export a sanitized HAR while reproducing the issue in a fresh Chrome profile:

    1. Open Developer Tools → Network.
    2. Enable Preserve log and Disable cache.
    3. Reproduce the entire flow.
    4. Capture:
      • The authorization request from External ID to the workforce tenant.
      • The POST or redirect returning to /federation/oauth2.
      • The complete response headers that set esctx.
      • The HTTP 200 response body and any JavaScript console error.
      • Request IDs, correlation IDs, UTC timestamps, and any AADSTS or External ID error.
    5. Remove tokens, authorization codes, secrets, and personal data before sharing the trace.

    In particular, look for error 40015 or “No email address was obtained from the external OIDC identity provider.” Error 40015 means upstream authentication succeeded but External ID could not validate the custom OIDC configuration or returned token.^4^

    Verify the federation contract

    For workforce-tenant federation, Microsoft documents these callback URIs in the workforce tenant’s app registration:

    https://<tenant-subdomain>.ciamlogin.com/<tenant-ID>/federation/oauth2
    https://<tenant-subdomain>.ciamlogin.com/<tenant-subdomain>.onmicrosoft.com/federation/oauth2
    

    Also verify:

    • Supported account types is Accounts in this organizational directory only.
    • Delegated permissions include email, openid, profile, and User.Read, with admin consent.
    • The issuer uses the workforce tenant GUID or its onmicrosoft.com domain—not another verified custom domain.
    • The identity provider is attached to the applicable External ID user flow.^4^

    If the returned ID token lacks email, go to the workforce tenant’s App registrations → federation application → Token configuration → Add optional claim → ID → email, save, and retest. External ID requires the email claim for this federation scenario. Granting the delegated email permission does not itself guarantee that the ID token emits an email claim.^4^

    If the identity-provider issuer or related configuration was changed after it was added to the user flow, remove the provider from that flow, save, add it again, save, and retest so the flow refreshes its configuration.^4^

    Logs and escalation

    With at least Reports Reader, check both tenants at Entra ID → Monitoring & health → Sign-in logs. Filter by user, application, failure status, and reproduction time; record the correlation ID, error code, failure reason, and additional details.^5^

    From the relevant event, select Launch the Sign-in diagnostic. It analyzes the event and provides remediation recommendations.^6^

    If the trace confirms repeated malformed Set-Cookie responses and no token/configuration error explains the stop, create a support request from Diagnose and solve problems. Include:

    • External and workforce tenant identifiers.
    • UTC timestamp and correlation/request IDs.
    • Sanitized HAR showing the return from the workforce tenant and malformed header.
    • Chrome version and a screenshot of the blocked-cookie issue.
    • Whether another supported browser reproduces it.
    • A minimal reproduction and affected user-flow/application IDs.

    Microsoft Support and the Entra engineering team can correlate these details with service-side tenant and sign-in telemetry.^7^


    References

    1. Web browser cookies used in Microsoft Entra authentication
    2. How to handle SameSite cookie changes in Chrome browser - Microsoft identity platform | Microsoft Learn
    3. Known issues in external tenants - Microsoft Entra External ID | Microsoft Learn
    4. Add a Microsoft Entra ID tenant as an OpenID Connect identity provider
    5. How to troubleshoot Microsoft Entra sign-in errors
    6. What is the Sign-in diagnostic in Microsoft Entra ID?
    7. Microsoft Entra diagnostic logs
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

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.