Skip to content

Bugfix: Honor --subscription and --project-endpoint flags over stored env values#8093

Merged
saanikaguptamicrosoft merged 1 commit into
Azure:foundry-training-devfrom
saanikaguptamicrosoft:saanika/fixenv
May 7, 2026
Merged

Bugfix: Honor --subscription and --project-endpoint flags over stored env values#8093
saanikaguptamicrosoft merged 1 commit into
Azure:foundry-training-devfrom
saanikaguptamicrosoft:saanika/fixenv

Conversation

@saanikaguptamicrosoft
Copy link
Copy Markdown
Collaborator

@saanikaguptamicrosoft saanikaguptamicrosoft commented May 7, 2026

Notes

Old Experience - Inconsistent. Flags were sometimes silently ignored, and the override confirmation prompt didn't always appear, making behavior unpredictable and misleading.

New Experience - When both flags are provided, the current azd environment is now updated in place to reflect the targeted subscription and project (including derived tenant, resource group, location, and account name, matching what init writes). A yellow warning informs the user that their stored env values were overridden and that the changes persist for subsequent commands.

Testing

image

@saanikaguptamicrosoft saanikaguptamicrosoft merged commit 31526a5 into Azure:foundry-training-dev May 7, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants