403 forbidden error on function app while deploying with Azure Devops

Amit Singh 5 Reputation points
2023-11-03T06:54:31.2433333+00:00

Hi Everyone,

I am getting an error of 403 forbidden on my function app. I tried to check the logs on Application Gateway, didn't see any logs that might have been blocked. I have restarted my function app and tried to check logs on the function app but nothing worked. No logs related to 403 forbidden.

Please find the attached screenshot for the same.

User's image

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
{count} vote

1 answer

Sort by: Most helpful
  1. VenkateshDodda-MSFT 25,241 Reputation points Microsoft Employee Moderator
    2023-11-03T07:48:19.7166667+00:00

    @Amit Singh Thanks for reaching out to Microsoft Q&A, apologize for any inconvenience caused on this.

    In the above screenshot, the error message IpForbidden means when the devOps agent is trying to connect to function app and it is failing this might be due to the access restrictions that were enabled.

    I would suggest you check whether does your function app is configured with any access restrictions or not? If yes, check whether you have allowed the Azure devOps agent to communicate with function app.

    If you are using Microsoft Agent and you are allowing Azure devops as service tag in access restriction, then this is an expected behavior. As mentioned in this documentation Microsoft-hosted agents can't be listed by service tags. If you're trying to grant hosted agents access to your resources, you'll need to follow the IP range allow listing method.

    One Workaround is to whitelist all the Ip's depend on the region in which Geo location your project is present and also note that these Ip's will get changed/Updated weekly.

    Refer to this similar issue in the Stack Overflow here.

    Feel free back to reach back to me if you have any further

    0 comments No comments

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.