Share via

Unable to insert HTTP header via an application rule configure in Azure Firewall policy

Beatrice DUPAS 0 Reputation points
2026-03-17T17:16:48.4133333+00:00

Following this link, it's possible to insert a header: https://learn.microsoft.com/en-us/rest/api/firewall/firewall-policy-rule-collection-groups/create-or-update?view=rest-firewall-2025-05-01&tabs=HTTP

Unfortunately, it does not work in my environment (Firewall with Sku Premium) TLS enabled in Policy (child policy) with certificate configured in a Key vault, I configured the rule :

{

  "rules": [

    {

      "ruleType": "ApplicationRule",

      "name": "tenant-restriction-application",

      "description": "Insert trusted tenants header",

      "protocols": [

        {

          "protocolType": "Https",

          "port": 443

        },

        {

          "protocolType": "Http",

          "port": 80

        }

      ],

      "fqdnTags": [],

      "webCategories": [],

      "targetFqdns": [

        "login.microsoft.com",

        "login.microsoftonline.com",

        "login.windows.net"

      ],

      "targetUrls": [],

      "terminateTLS": true,

      "sourceAddresses": [

        "10.0.10.0/24"

      ],

      "destinationAddresses": [],

      "sourceIpGroups": [],

      "httpHeadersToInsert": [

        {

          "headerName": "Restrict-Access-To-Tenants",

          "headerValue": “mytenant.onmicrosoft.com"

        }

      ]

    }

  ]

}

What is the issue ?

Azure Firewall
Azure Firewall

An Azure network security service that is used to protect Azure Virtual Network resources.


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.