Skip to content

AZURE_SERVER_APP_SECRET not regenerated on redeploy after deleting apps #2522

@jrussellaz

Description

@jrussellaz

After deleting the Entra client applications and redeploying using azd up, the expected environment variables AZURE_SERVER_APP_SECRET and AZURE_CLIENT_APP_SECRET are not correctly regenerated.

Steps to Reproduce:

  1. Configure Entra authentication using Automatic Setup
  2. Deploy using azd up
  3. Manually delete the two Entra client applications
  4. Redeploy using azd up

Expected Behavior:

  • The two client apps are recreated

  • New secrets are generated

  • The following environment variables are updated with the new values:

    • AZURE_SERVER_APP_SECRET
    • AZURE_CLIENT_APP_SECRET

Actual Behavior:

  • The client apps are recreated
  • Secrets are not regenerated
  • The environment variables retain the old values from the previous deployment

Additional Notes:

I also manually deleted the following environment variables before redeploying:

  • AZURE_SERVER_APP_ID
  • AZURE_SERVER_APP_SECRET
  • AZURE_CLIENT_APP_ID
  • AZURE_CLIENT_APP_SECRET

After redeployment it seems both client apps are recreated with the secrets, so this appears to work correctly.

Metadata

Metadata

Assignees

Labels

authRelated to user login or data access control features that use Entra, MSAL SDK, Built-in Authopen issueA validated issue that should be tackled. Comment if you'd like it assigned to you.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions