An Error 403 occurs when triggering the function app manually, scheduled triggering is working. The function app has private endpoints and is reachable from on-premise. function-app-manual-trigger
<h1 id="unavailable">Error 403 - Forbidden</h1> <p id="tryAgain">The web app you have attempted to reach has blocked your access.</p>
The function app can be manually triggered from a vm within the same network: no error occurs on the vm, but the logs don't show any activity.
curl -X POST -H "Content-Type application/json" "https://<appname>.azurewebsites.net/api/<appname>/<functionkey>"
Microsoft says this is expected behavior when using private endpoints, but at least the vm within the same vnet should trigger? Any thoughts are appreciated.
An Error 403 occurs when triggering the function app manually, scheduled triggering is working. The function app has private endpoints and is reachable from on-premise. function-app-manual-trigger
<h1 id="unavailable">Error 403 - Forbidden</h1> <p id="tryAgain">The web app you have attempted to reach has blocked your access.</p>
The function app can be manually triggered from a vm within the same network: no error occurs on the vm, but the logs don't show any activity.
curl -X POST -H "Content-Type application/json" "https://<appname>.azurewebsites.net/api/<appname>/<functionkey>"
I tried the same in my environment created Azure function app with private endpoint like below:
Under networking added private endpoint:
Make sure to add Vnet integration try to add same virtual network associated with VM like below:
![enter image description here](https://i.imgur.com/tZTmaef.png)
Now in function app when I try to trigger manually, it triggered successfully like below:
The function app is reachable from on-premises with private endpoint network like below:
To get logs and activity check the below:
curl -X POST -H "Content-Type application/json" "https://<appname>.azurewebsites.net/api/<appname>/<functionkey>"
In your function app -> logs -> type requests
you will be able to see the log and activity of status like below:
You can make use of diagnostic setting:
In function app -> diagnostic setting selects the destination for your logs and metrics. You can route it to either Azure Monitor, Event Hubs, Log Analytics workspace, or Storage account like below.
You may configure the collection and transmission of logs and metrics from your Azure Function app to various monitoring and analytics services using the diagnostic settings for Azure Function.
While using virtual network ensure Service endpoints
is enabled. As a result, your function app may securely access these services without depending to rely on public endpoints.
Check the Access restrictions in this GitHub blog by ggailey.