Azure App Service Returns Error - Error 403 - Forbidden The web app you have attempted to reach has blocked your access

Viewed 26618

I am getting error while accessing the Azure App Service, can you help in resolving the issue ?

What setting to be applied to resolve the issue ?

enter image description here

Thanks in advance.

2 Answers

This error comes either

  • When the public access is not allowed on Azure App Service, if you have open public API.
  • The IP of your application with which you are calling the app service is not whitelisted.
  • If you have any gateway in between then that may also be blocking your calls.

Solutions to try:

  • Try removing the access restrictions from Networking page of your web app.

    enter image description here

  • Try giving the access to all by adding 0.0.0.0/0. Later you can add restrictions based on your requirements. enter image description here

  • The sequence of the restrictions matters, so please check that once. If you have any blocked call before any allowed call, then it may impact. enter image description here

  • You can also have restrictions based on http-headers like X-Forwarded-For. Please check that once. This can happen from code as well, based on how you handle the errors. Link

  • If your API is behind the Gateway, then you can check this: Application Gateway integration with service endpoints

Are you the developer of this website?

If you are, please navigate to Networking page of your web app, check the Access Restrictions. enter image description here If you are not the developer, just contact your administrator and allow your ip to access this website.

For more information, see Azure App Service access restrictions.

Related