Remove deprecated `login` and `logout` commands
The deprecated azd login and azd logout commands, previously hidden from help and issuing deprecation warnings, are now fully removed. Users must use azd auth login and azd auth logout.
Changes
- Command registration: Removed
loginandlogoutfrom root command tree inroot.go - Dead code cleanup: Removed
newLoginFlags()andnewLoginAction()helpers that were only used by the deprecated command paths - Test migration: Updated functional test from
azd logintoazd auth login - User-friendly error messages: Added helpful error messages in
auto_install.gothat direct users to the correct commands when they attempt to use the removed commands
Behavior
$ azd login
Error: The 'azd login' command has been removed.
Please use 'azd auth login' instead.
$ azd logout
Error: The 'azd logout' command has been removed.
Please use 'azd auth logout' instead.
$ azd auth login --help
Log in to Azure.
[...]
The deprecation warning code in auth_login.go remains as it's still used to differentiate between azd auth login (no warning) and the now-removed azd login (showed warning) via the loginCmdParentAnnotation check.
Original prompt
This section details on the original issue you should resolve
<issue_title>Remove
logincommand. It is DEPRECATED</issue_title> <issue_description>logincommand no longer inazd --helpas a valid command. When a user runsloginthey are instructed to useauth loginnext time.azd login WARNING: `azd login` is deprecated and will be removed in a future release. Next time use `azd auth login`.</issue_description>
Comments on the Issue (you are @copilot in this section)
- Fixes Azure/azure-dev#6394
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
@copilot if a user runs azd login or azd logout please return a message directing them to use the related auth login/logout commands.
@copilot if a user runs
azd loginorazd logoutplease return a message directing them to use the relatedauth login/logoutcommands.
Done! When users run azd login or azd logout, they now see:
Error: The 'azd login' command has been removed.
Please use 'azd auth login' instead.
Implemented in commit 8fa5931.
[!WARNING]
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
aka.ms
- Triggering command:
./azd ./azd login Rb6Wm5_wKVH2YPvgxQ14/Rb6Wm5_wKVH2YPvgxQ14 -goversion go1.25.5 -c=4 -nolocalimports -importcfg /tmp/go-build695381876/b783/importcfg -pack /home/REDACTED/go/pkg/mod/go.opentelemetry.io/otel/[email protected]/trace/internal/x/x.go ache/go/1.25.5/x-trimpath conf 27/css/handlers.-p z2AXocTsi x_amd64/compile(dns block)- Triggering command:
./azd ./azd logout CDYjOXz9-3YUNF6NVFRZ/CDYjOXz9-3YUNF6NVFRZ -goversion go1.25.5 -c=4 -nolocalimports -importcfg /tmp/go-build695381876/b791/importcfg -pack /home/REDACTED/go/pkg/mod/go.opentelemetry.io/proto/[email protected]/trace/v1/trace.pb.go 3.o remo o go x_amd64/compile(dns block)- Triggering command:
/home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd extension source add -n local -t file -l /home/REDACTED/work/azure-dev/azure-dev/cli/azd/extensions/registry.json -lang=go1.24 x_amd64/vet -o _.a rg/x/[email protected] x_amd64/vet /ops/accesstoken/opt/hostedtoolcache/go/1.25.5/x64/pkg/tool/linux_amd64/vet zd/pkg/project -lang=go1.25 x_amd64/vet(dns block)If you need me to access, download, or install something from one of these locations, you can either:
- Configure Actions setup steps to set up my environment, which run before the firewall is enabled
- Add the appropriate URLs or hosts to the custom allowlist in this repository's Copilot coding agent settings (admins only)
/check-enforcer override
/azp run azure-dev - cli
Azure Pipelines successfully started running 1 pipeline(s).