We were running into the exact same issue and were able to fix thanks to the answer on this thread: https://learn.microsoft.com/en-us/answers/questions/2140342/azure-functions-flex-consumption-plan-authenticati
You can exclude path of the authentication, and apparently /admin
is the dashboard path.
So something like this in Bicep:
globalValidation: {
requireAuthentication: true
unauthenticatedClientAction: 'RedirectToLoginPage'
excludedPaths: [
'/admin/*'
]
}
Or Terraform:
auth_settings_v2 {
auth_enabled = true
require_authentication = true
require_https = true
unauthenticated_action = "Return401"
excluded_paths = ["/admin/*"]
I didn't see the option to do that through the portal though.