From 51687a91f5220b57e5d2ddcd90e8b952f456826d Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> Date: Tue, 14 Nov 2023 16:16:23 +0100 Subject: [PATCH] Add warning for test token when scopes are given to the cmd --- internal/cli/test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/cli/test.go b/internal/cli/test.go index 04d60bd35..1c0b42976 100644 --- a/internal/cli/test.go +++ b/internal/cli/test.go @@ -208,6 +208,10 @@ func testTokenCmd(cli *cli) *cobra.Command { cli.renderer.Newline() if client.GetAppType() == appTypeNonInteractive { + if len(inputs.Scopes) != 0 { + cli.renderer.Warnf("Passed in scopes do not apply to Machine to Machine applications.\n") + } + tokenResponse, err := runClientCredentialsFlow(cmd.Context(), cli, client, inputs.Audience, cli.tenant) if err != nil { return fmt.Errorf(