sasAuthenticationPolicy JSON object disable in Logic App

AdamBudzinskiAZA-0329 96 Reputation points
2025-04-18T16:37:38.7966667+00:00

hi,

anyone has a working example on hop to patch a Logic App to disable SAS token ?

https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-securing-a-logic-app?tabs=azure-portal&ref=hybridbrothers.com#add-the-sasauthenticationpolicy-property-to-your-workflow-definition

{
  "properties": {
    "definition": {
      "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
      "contentVersion": "1.0.0.0",
      "parameters": {
        "$connections": {
          "defaultValue": {},
          "type": "Object"
        }
      },
      "triggers": {
        "When_a_HTTP_request_is_received": {
          "type": "Request",
          "kind": "Http",
          "inputs": {
            "method": "POST",
            "schema": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "topic": {
                    "type": "string"
                  },
                  "subject": {
                    "type": "string"
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "timestamp": {
                        "type": "string"
                      },
                      "policyAssignmentId": {
                        "type": "string"
                      },
                      "policyDefinitionId": {
                        "type": "string"
                      },
                      "policyDefinitionReferenceId": {
                        "type": "string"
                      },
                      "complianceState": {
                        "type": "string"
                      },
                      "subscriptionId": {
                        "type": "string"
                      },
                      "complianceReasonCode": {
                        "type": "string"
                      }
                    }
                  },
                  "eventType": {
                    "type": "string"
                  },
                  "eventTime": {
                    "type": "string"
                  },
                  "dataVersion": {
                    "type": "string"
                  },
                  "metadataVersion": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "topic",
                  "subject",
                  "data",
                  "eventType",
                  "eventTime",
                  "dataVersion",
                  "metadataVersion"
                ]
              }
            }
          },
          "conditions": [
            {
              "expression": "@startsWith(triggerOutputs()?['headers']?['Authorization'], 'Bearer')"
            }
          ],
          "operationOptions": "EnableSchemaValidation, IncludeAuthorizationHeadersInOutputs"
        }
      },
      "actions": {},
      "outputs": {}
    },
    "parameters": {
      "$connections": {
        "value": {}
      }
    },
    "accessControl": {
      "triggers": {
        "openAuthenticationPolicies": {
          "policies": {
            "etst": {
              "type": "AAD",
              "claims": [
                {
                  "name": "iss",
                  "value": "https://sts.windows.net/tennt-id-goes-here/"
                }
              ]
            }
          }
        },
        "sasAuthenticationPolicy": {
          "state": "Disabled"
        }
      }

getting

{

"error": {

"code": "PatchWorkflowPropertiesNotSupported",

"message": "The request to patch workflow 'Logic App' is not supported. None of the fields inside the properties object can be patched."

}

}

anyone ?

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,470 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Suwarna S Kale 2,136 Reputation points
    2025-04-20T01:12:49.7466667+00:00

    Hello AdamBudzinskiAZA-0329,

    Thank you for posting your question in the Microsoft Q&A forum. 

    The error occurs because Azure Logic Apps do not support direct PATCH operations on workflow properties. Instead, you must update the entire Logic App definition via an ARM template or PUT request. To disable SAS tokens: 

    • Export your Logic App’s JSON definition (via Azure Portal or GET API call). 
    • Add/modify the sasAuthenticationPolicy property under accessControl.triggers as shown in your example. 
    • Redeploy the updated JSON using an ARM template deployment or PUT request to the Logic App’s resource endpoint. 

    Key Notes: 

    • Use PUT (not PATCH) to overwrite the entire definition. 
    • Validate the JSON structure to avoid syntax errors. 
    • Consider Azure Policy or DevOps pipelines for automated enforcement. 

    If the above answer helped, please do not forget to "Accept Answer" as this may help other community members to refer the info if facing a similar issue. Your contribution to the Microsoft Q&A community is highly appreciated.

    0 comments No comments

Your answer

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