An Azure service that provides an event-driven serverless compute platform.
The documented Easy Auth V2 behavior does not explain these test results: an incorrect value in the app setting named by clientSecretSettingName should not become valid merely because some other valid secret exists on the app registration.
Documented behavior
identityProviders.azureActiveDirectory.registration.clientSecretSettingName is defined as the app-setting name that contains the relying-party application's client secret.^1^ For an automatically created registration, the portal normally stores that value in the slot-sticky MICROSOFT_PROVIDER_AUTHENTICATION_SECRET setting.^2^
Easy Auth's documented flow selection is:
- Secret configured: Easy Auth acts as a confidential client, requests
code id_token, and exchanges the authorization code using the secret. - No secret configured: Easy Auth falls back to
response_type=id_token, the implicit flow, without a server-side code exchange.^3^
Consequently, the documented confidential-client path would require the actual secret value. Entra cannot authenticate an incorrect value based only on the existence of another credential.
There is no public documentation here establishing that Easy Auth:
- retrieves a secret value from an app registration;
- selects an arbitrary valid secret attached to that registration;
- treats the mere presence of a secret as proof of client identity; or
- falls back from an invalid configured secret to another app-registration credential.
The observed “delete any valid secret → failure; create an unrelated secret → success” behavior therefore needs runtime evidence and App Service support investigation. It should not be treated as a supported credential-selection mechanism.
Supported alternative credentials
These alternatives apply only when explicitly configured:
- Managed identity with federated identity credentials Easy Auth supports this through a specific override:
- Create the federated identity credential on the app registration.
- Add
OVERRIDE_USE_MI_FIC_ASSERTION_CLIENTIDas an app setting whose value is the managed identity’s client ID. - Set
clientSecretSettingNameitself toOVERRIDE_USE_MI_FIC_ASSERTION_CLIENTID.
- Certificate credential The V2 schema exposes
clientSecretCertificateThumbprint,clientSecretCertificateIssuer, andclientSecretCertificateSubjectAlternativeNameas alternatives to a client secret.^4^ Check the effective V2 resource for these properties; do not infer their use from certificates merely existing on the app registration. - File-based configuration If
platform.configFilePathis populated, the referenced file defines Easy Auth behavior instead of the normal ARM configuration. On Linux, this must be an absolute path such as/home/site/wwwroot/auth.json.^5^ - Legacy V1 state V1 stored secrets differently. Migration to V2 moves them into slot-sticky application settings. Inspecting both configurations is appropriate for an app with migration history, although the portal authentication experience requires V2.^6^
Establish the effective path
Capture the effective configuration without printing any secret values:
az webapp auth show \
--resource-group <resource-group> \
--name <function-app>
az functionapp config appsettings list \
--resource-group <resource-group> \
--name <function-app> \
--query "[?contains(name, 'AUTH') || contains(name, 'OVERRIDE')].name"
For a deployment slot, target the slot explicitly. Check:
-
platform.configFilePath -
platform.runtimeVersion -
clientSecretSettingName - all three certificate properties
- whether
OVERRIDE_USE_MI_FIC_ASSERTION_CLIENTIDis selected - whether the inspected resource is the production site or a slot
Run each new login in a fresh private-browser session. Easy Auth caches tokens for an authenticated session, and Microsoft recommends signing out or using a newly opened private session after authentication changes.^7^
Logs that can distinguish the flow
Enable App Service application logging and failed-request tracing. Authentication traces appear in the application logs; failed-request traces identify the EasyAuthModule_32/64 module on Windows.^3^
Also route App Service authentication resource logs to Log Analytics. The AppServiceAuthenticationLogs table includes CorrelationId, Details, Message, OperationName, StatusCode, ModuleRuntimeVersion, and UTC TimeGenerated.^8^
AppServiceAuthenticationLogs
| where TimeGenerated > ago(30m)
| where SiteName =~ "<function-app-name>"
| project TimeGenerated, CorrelationId, OperationName,
StatusCode, Level, Message, Details, ModuleRuntimeVersion
| order by TimeGenerated asc
Correlate the failed attempt with Entra ID → Sign-in logs or Diagnose & solve problems → Sign-in Diagnostic using the application, UTC timestamp, correlation ID, or request ID.^9^
If the logs do not identify the credential type, open an Azure support case for App Service Authentication, providing:
- Function App resource ID and slot;
- UTC timestamps for one success and one failure;
- Easy Auth and Entra correlation/request IDs;
- redacted
authsettingsV2; - authentication runtime version;
- the four-test matrix;
- confirmation that each test used a new private session.
Microsoft support would need platform-side traces to confirm whether this is cached or hidden auto-provisioned state, a runtime defect, or another undocumented implementation detail.
References
- Microsoft.Web/sites/config 'authsettingsV2' - Bicep, ARM template ...
- Configure your App Service or Azure Functions app to use Microsoft Entra sign-in
- Authentication and authorization in Azure App Service and Azure Functions
- Microsoft.Web sites/slots/config 'authsettingsV2' 2022-09-01 (deployment-language-arm-template)
- Configure authentication in Azure App Service by using a configuration file
- Manage Authentication and Authorization API Versions - Azure App Service
- Tutorial: Authenticate and authorize users end-to-end in Azure App Service (platform-windows)
- AppServiceAuthenticationLogs
- What is the Sign-in diagnostic in Microsoft Entra ID?