Subchapter 42.35
references/services/functions/consumption-to-flex/windows/automation/built-in-authentication.mdMarkdown3 KBView on GitHub
Use the safe source summary captured in Step 3c. If enabled is false, mark this step skipped — source Easy Auth disabled.
If authentication is enabled, do not copy the source auth payload wholesale. Provider registrations, client secrets, Key Vault references, audiences, and redirect URIs can be app-specific. Never display or persist provider secrets.
Get the target hostname:
az functionapp show --name <NEW_APP_NAME> --resource-group <RESOURCE_GROUP> --query defaultHostName -o tsvFor each enabled provider, identify the target callback URI required by that provider. Easy Auth callback URIs generally use https://<TARGET_HOSTNAME>/.auth/login/<PROVIDER>/callback, but verify the exact URI against the provider-specific instructions in Configure built-in authentication (opens in a new tab).
Use ask_user:
The source app uses built-in authentication with
<PROVIDERS>. Authentication registrations and secrets aren’t transferred automatically. How should we handle authentication for<NEW_APP_NAME>?
If deferred, record the enabled providers and target callback URIs in <UPGRADE_DIR>/upgrade-status.md without secrets. Mark this step deferred — built-in authentication not configured and stop before Step 5. Do not deploy code or run target HTTP validation while the authentication boundary is absent.
If configuring now:
For each provider, ask whether to reuse its existing registration or create a target-specific registration. Obtain approval before changing an external identity-provider registration.
Guide the user through the provider-specific configuration. Don’t request secrets in chat or place them in migration artifacts; have the user configure them directly through the portal, an existing secret-bearing app setting, or a Key Vault reference.
Ensure the target callback URI is registered with the provider.
Verify the target using the same safe projection used in Step 3c:
az webapp auth show --name <NEW_APP_NAME> --resource-group <RESOURCE_GROUP> --query "{enabled:enabled,unauthenticatedClientAction:unauthenticatedClientAction,defaultProvider:defaultProvider,tokenStoreEnabled:tokenStoreEnabled,allowedAudiences:allowedAudiences,allowedExternalRedirectUrls:allowedExternalRedirectUrls,isAuthFromFile:isAuthFromFile,providers:{aadClientId:clientId,githubClientId:gitHubClientId,googleClientId:googleClientId,facebookAppId:facebookAppId,twitterConsumerKey:twitterConsumerKey,microsoftAccountClientId:microsoftAccountClientId}}" -o jsonCompare enabled state, unauthenticated behavior, default provider, allowed audiences and redirects, token-store state, and configured provider identifiers. Record intentional differences. Mark the step complete only after the target provider configuration and callback URI are verified.
Do not use an enable-only az webapp auth update command as a substitute for recreating the provider configuration.