Using a logic app trigger with sas for CSP reporting breaks IIS


I've created an Azure logic app as a consumer for my CSP reporting-uri for our web pages. I'm adding the CSP header using the web.config file per

Problem I have is while this works with other endpoints the Azure logic app endpoint uri has a rather long SAS attached to URL and when used IIS generates a 500 error on loading.

Is there a way I can configure IIS to handle the longer string? OR Is there a way I could configure the logic app to accept a shorter URL as a trigger? Or something I can do within Azure to get around this problem?

Internet Information Services
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,952 questions
Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
322 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pramod Valavala 20,606 Reputation points Microsoft Employee

    @Anonymous If the problem is indeed due to the longer trigger URL of Logic Apps, you could front it with Azure Front Door or Azure APIM that can provide a shorter and more intuitive URL, forwarding the request to Logic Apps.

1 additional answer

Sort by: Most helpful
  1. HuryShen - MSFT 321 Reputation points

    Hi @Anonymous ,

    For this problem, please check if the 500 error was generated by IIS or logic app. If 500 error comes from logic app, it should be something wrong inside logic app, you need to check the actions in your logic app. If 500 error was generated because some issue when IIS request the logic app url, you need to check the cause of this issue. You can use FRT to check the error details.

    If you get 500 error outside IIS and the actual error is 414 The request url is too long, you can take a look of this post, I think it may help with your problem.

    By the way, I'm afraid we can't set the trigger url of logic app with a short one because as far as I know we can't disable SAS of logic app url.

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.