I Have configured a azure function app with authentication enabled to Azure Ad and placed behind the application gateway. Now this function app should be access only through application gateway public IP DNS , have gone to access restriction option of function app and only allowed "default subnet of vnet which comes when configuring application gateway".
The issue after this is while calling the URL of application gateway, it tries authenticate using azure AD and after successful authentication we are getting 403 error with the URL "https://*****.azurewebsites.net/.auth/login/aad/callback".