Issue configuring Azure AD with Function App

Dale Godfredson 221 Reputation points
2021-08-20T12:06:33.68+00:00

I've followed the documentation here (https://learn.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad#configure-client-apps-to-access-your-app-service) to configure App Registration for an Azure Function App. I've tried both using an existing App Registration and Creating a new App Registration automatically however I just get the following error message:

You do not have permission to view this directory or page.

The function app works correctly before I create and configure the App Registration.

Can someone please assist. The URL is: https://coy-test-auth.azurewebsites.net/api/TestAuth?

Thanks
Dale

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,237 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pramod Valavala 20,516 Reputation points Microsoft Employee
    2021-08-24T19:07:16.723+00:00

    @Dale Godfredson There is an option to set the default response - 401 or 302. A 302 response will redirect the caller to the identity provider to perform authentication. In your case, you seem to have set it to 401.

    If you are using File based Configuration, you need to set globalValidation.unauthenticatedClientAction to RedirectToLoginPage.