how to fixAzure applications have been getting occasional 403 (“Forbidden”) errors.

VP, Anand 0 Reputation points
2023-10-09T17:18:20.46+00:00

Over the last month Azure applications have been getting occasional 403 (“Forbidden”) errors.

• The errors always seem to happen during the initial Azure AD OAUTH2 authentication phase (where users are redirected to login.microsoftonline.com and back) – though I’ve not been able to trap a failure “in the wild” to see exactly the step that is failing. Once the user is authenticated, all works as expected.

• The errors occur only occasionally, but do seem to be clumped together in time

• They occur in at least two of our subscriptions (Test and Prod) and across multiple application technologies (PHP and .NET). Test, in particular, has a low usage so it doesn’t feel like a resource exhaustion problem within the subscription

It’s conceivable it could be a problem at our end (maybe with our application gateway), but we’ve made no changes. At the moment, it feels more like a more central problem. Any ideas from your end?

  1. All hrefs/redirects point to the app gateway
  2. The problem is intermittent.  Most of the time things work fine; only occasionally do things fail (using exactly the same calls as work normally)
  3. The forbidden IP address is that of the app gateway itself.  So traffic must be coming from there!
Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,217 questions
{count} votes

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.