Function App: Troubleshooting 403 Forbidden on Test/Run and Admin Path Access

EricMeierotto-5130 0 Reputation points
2026-10-13T15:49:41.0666667+00:00

Problem description

I am experiencing a 403 Forbidden error when attempting to test my Function App via the Azure portal Test/Run feature. The logs are empty, and the request does not reach my function code. I suspect there might be an authorization or permission issue before the function execution begins.

Environment

Function App, Azure portal, Region not specified in case information.

What I've already tried

I have added the Azure portal origins to the Function App CORS allowed origins list and confirmed the settings are saved. I also tried calling the admin endpoint directly using the current host keys via curl, but the 403 Forbidden response persists. I have ensured that public network access is enabled, and no access restriction rules are configured.

Current status

The issue appears to be an authorization problem before the function code runs, possibly at the portal or admin path level. I am seeking guidance on how to diagnose and resolve the 403 Forbidden error during the portal Test/Run invocation to allow proper testing of my PowerShell function.

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Rukshan edirisinghe 1,645 Reputation points
    2026-10-14T04:43:35.13+00:00

    Hi @EricMeierotto-5130

    Since the request never reaches your code and even the admin endpoint with a valid host key returns 403, something at the platform layer is rejecting it before the Functions host sees it. With CORS and access restrictions already ruled out, the most common culprit is App Service Authentication (Easy Auth). It sits in front of the whole app, and one of its options is to reject every unauthenticated request with exactly a 403.

    1. In the Function App, open Settings > Authentication.
    2. If an identity provider is configured, look at Restrict access and Unauthenticated requests. If it says "Require authentication" with HTTP 403 Forbidden, that explains both the portal Test/Run and your curl call.
    3. To confirm, temporarily switch Unauthenticated requests to Allow unauthenticated access (or turn authentication off on a non-production app) and run Test/Run again.
    4. If that was it, decide how you want to keep it secured: either call the function with a valid token from the identity provider, or configure excluded paths for the routes that should stay key-based.

    If Authentication isn't configured at all, the next place I'd look is Configuration > General settings > Incoming client certificates. If that's set to Required, calls without a client certificate are also rejected before your code runs.

    Is there anything listed under the Authentication blade on this Function App?

    If this resolved your issue, please consider accepting it as the answer. If both settings are clean and the 403 stays, let me know and I'll be happy to keep helping.

    Reference:

    Was this answer helpful?

    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.