diff --git a/cmd/login.go b/cmd/login.go index bf122dabd..b3e030ae1 100644 --- a/cmd/login.go +++ b/cmd/login.go @@ -23,6 +23,7 @@ package cmd import ( "context" "errors" + "fmt" "strings" "github.com/Azure/azure-storage-azcopy/v10/common" @@ -31,6 +32,10 @@ import ( var loginCmdArg = loginCmdArgs{tenantID: common.DefaultTenantID} +var loginNotice = "'azcopy %s' command will be deprecated starting release 10.22. " + + "Use auto-login instead. Visit %s to know more." +var autoLoginURL = "https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-authorize-azure-active-directory#authorize-without-a-secret-store " + var lgCmd = &cobra.Command{ Use: "login", SuggestFor: []string{"login"}, @@ -45,6 +50,7 @@ var lgCmd = &cobra.Command{ loginCmdArg.clientSecret = glcm.GetEnvironmentVariable(common.EEnvironmentVariable.ClientSecret()) loginCmdArg.persistToken = true + glcm.Info(fmt.Sprintf(loginNotice, "login", autoLoginURL)) if loginCmdArg.certPass != "" || loginCmdArg.clientSecret != "" { glcm.Info(environmentVariableNotice) } diff --git a/cmd/logout.go b/cmd/logout.go index 172cd812a..1df552607 100644 --- a/cmd/logout.go +++ b/cmd/logout.go @@ -53,6 +53,7 @@ func init() { type logoutCmdArgs struct{} func (lca logoutCmdArgs) process() error { + glcm.Info(fmt.Sprintf(loginNotice, "logout", autoLoginURL)) uotm := GetUserOAuthTokenManagerInstance() if err := uotm.RemoveCachedToken(); err != nil { return err