Back to controls

Ensure Function App Authentication is set up

Azure Functions with HTTP endpoints should not rely on application code alone to reject unauthenticated requests. App Service Authentication provides a platform enforcement point before requests reach the function runtime.

Category

Controls

Medium

Applies to

Microsoft Azure

Coverage

1 queries

Asset types

1 covered

Overview

Azure Functions with HTTP endpoints should not rely on application code alone to reject unauthenticated requests. App Service Authentication provides a platform enforcement point before requests reach the function runtime.

Unauthenticated Function Apps increase the public attack surface and can expose internal automation, webhooks, or APIs to abuse when authorization is missing, incomplete, or inconsistently implemented in code.

Remediation guidance

Remediation

Enable App Service Authentication for the Function App and require unauthenticated requests to be rejected or redirected to your approved identity provider. Choose the provider and unauthenticated action that matches the function's invocation pattern.

Azure CLI

Review the current authentication settings:

az webapp auth show \
  --resource-group {{asset.azureResourceGroup}} \
  --name {{asset.name}}

Enable authentication and reject unauthenticated requests with HTTP 401. The authV2 extension may be installed automatically by Azure CLI when required.

az webapp auth update \
  --resource-group {{asset.azureResourceGroup}} \
  --name {{asset.name}} \
  --enabled true \
  --unauthenticated-client-action Return401

If the function is meant to be called by users through a browser, configure the approved identity provider and use RedirectToLoginPage instead of Return401 where appropriate.

Validation

az webapp auth show \
  --resource-group {{asset.azureResourceGroup}} \
  --name {{asset.name}} \
  --query '{enabled:platform.enabled,unauthenticatedClientAction:globalValidation.unauthenticatedClientAction}'

Rollout guidance

  1. Confirm which callers invoke the function and whether they use user auth, workload identity, managed identity, or signed webhook tokens.
  2. Add authentication in staging first and verify all legitimate callers can still invoke the function.
  3. For intentionally public webhooks, document the exception and enforce compensating controls such as signed requests, IP restrictions, rate limiting, and monitoring.
  4. Capture the setting in IaC or Azure Policy so new Function Apps inherit the secure baseline.

References

  • https://learn.microsoft.com/en-us/cli/azure/webapp/auth
  • https://learn.microsoft.com/en-us/azure/app-service/overview-authentication-authorization

Query logic

These are the stored checks tied to this control.

Azure Function Apps without authentication

Connectors

Microsoft Azure

Covered asset types

FunctionApp

Expected check: eq []

{
  functionApps(where: { authSettings_NONE: { enabled: { eq: true } } }) {
    ...AssetFragment
  }
}
Cyscale Logo
Cyscale is an agentless cloud-native application protection platform (CNAPP) that automates the contextual analysis of cloud misconfigurations, vulnerabilities, access, and data, to provide an accurate and actionable assessment of risk.

Stay connected

Receive new blog posts and product updates from Cyscale

By clicking Subscribe, I agree to Cyscale’s Privacy Policy


© 2026 Cyscale Limited

LinkedIn icon
Twitter icon
Facebook icon
crunch base icon
angel icon