azure-dev icon indicating copy to clipboard operation
azure-dev copied to clipboard

Remove deprecated `login` and `logout` commands

Open Copilot opened this issue 2 weeks ago • 2 comments

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 login and logout from root command tree in root.go
  • Dead code cleanup: Removed newLoginFlags() and newLoginAction() helpers that were only used by the deprecated command paths
  • Test migration: Updated functional test from azd login to azd auth login
  • User-friendly error messages: Added helpful error messages in auto_install.go that 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 login command. It is DEPRECATED</issue_title> <issue_description>login command no longer in azd --help as a valid command. When a user runs login they are instructed to use auth login next 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 avatar Dec 17 '25 20:12 Copilot

@copilot if a user runs azd login or azd logout please return a message directing them to use the related auth login/logout commands.

spboyer avatar Dec 18 '25 15:12 spboyer

@copilot if a user runs azd login or azd logout please return a message directing them to use the related auth login/logout commands.

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:

Copilot avatar Dec 18 '25 15:12 Copilot

/check-enforcer override

vhvb1989 avatar Dec 23 '25 19:12 vhvb1989

/azp run azure-dev - cli

vhvb1989 avatar Dec 23 '25 19:12 vhvb1989

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Dec 23 '25 19:12 azure-pipelines[bot]