From 65ac9a336a92c3d3f7e0dece648437024a361c90 Mon Sep 17 00:00:00 2001 From: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com> Date: Fri, 7 Feb 2025 17:21:37 +0530 Subject: [PATCH] Add doc string for the `auth token` command (#2302) ## Changes The intent of this PR is to clarify that the `databricks auth token` command is not supported for M2M auth. Fixes: https://github.com/databricks/cli/issues/1939 ## Tests Manually. --- cmd/auth/token.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/auth/token.go b/cmd/auth/token.go index fbf8b68f6..f3468df40 100644 --- a/cmd/auth/token.go +++ b/cmd/auth/token.go @@ -46,6 +46,10 @@ func newTokenCommand(persistentAuth *auth.PersistentAuth) *cobra.Command { cmd := &cobra.Command{ Use: "token [HOST]", Short: "Get authentication token", + Long: `Get authentication token from the local cache in ~/.databricks/token-cache.json. +Refresh the access token if it is expired. Note: This command only works with +U2M authentication (using the 'databricks auth login' command). M2M authentication +using a client ID and secret is not supported.`, } var tokenTimeout time.Duration