403 from Azure DevOps Service Hook using HTTP triggered Azure Function with a private endpoint

dotnet_guy 15 Reputation points
2024-01-08T02:50:22.73+00:00

Hello,

I have a deployed Azure Function with private endpoint using System Assigned Managed Identity and talks to Azure DevOps API to update work items. I have to trigger the function based on an action in the service hook form, it is expecting authentication details, but the function doesn't use any. We added ADO deployed region's IP address range in the IP whitelist as well. Do I create a Microsoft Identity Provider in Authentication blade inside the Function app or there is another way?

Function works locally from Visual Studio when using Authorization Level 'Function' and gives a 203 when using 'Anonymous'. Firing the function from Edge.

It would be ideal if we do not use function key and send it as query param in the Service Hook form's URL.

Thanks.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,677 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MuthuKumaranMurugaachari-MSFT 22,421 Reputation points
    2024-01-11T02:23:05.12+00:00

    403 error can be investigated by enabling Application Insights in your azure function app and refer https://learn.microsoft.com/en-us/azure/azure-functions/configure-monitoring?tabs=v2. This logging will provide info about the client IP address and why the request was denied.

    Update for the community: Rohit Juluru resolved the issue by adding Azure DevOps project region's (visible in the settings) IP ranges to IP firewall of the Azure Function (Inbound).

    I hope this helps others with the similar issues. Please let me know if any questions.

    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.