AAD B2C Custom Policies: Add Pragma Header to token response?

Bruce Harrison 21 Reputation points
2022-05-18T17:43:23.56+00:00

Is there any way to add additional headers to the JWT token response message? The system I am integrating with expects a Pragma header for compatibility, but B2C only sends a Cache-Control header. Is there anything I can do about this?

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,639 questions
0 comments No comments
{count} votes

Accepted answer
  1. 2022-05-18T18:33:13.633+00:00

    Hello @Bruce Harrison , currently this is not possible. As workaround you might create a middleware that add's any custom header to the B2C response.

    Please take a look to the following development resources:

    Interactive signin (recommended):

    1. Use the Microsoft Authentication Library for JavaScript to work with Azure AD B2C
    2. Use MSAL.NET to sign in users with social identities

    Non-interactive signin (daemon/service/application):

    1. MSAL Username/password (ROPC)
    2. Microsoft Authentication Library for Node (msal-node)
    3. Configure the ROPC flow in Azure AD B2C with MSAL.NET

    Let us know if this answer was helpful to you or if you need additional assistance. If it was helpful, please remember to accept it so that others in the community with similar questions can more easily find a solution.


0 additional answers

Sort by: Most helpful