whenever I run commands in the cloud shell, I always get a message to upgrade the cli

Abe Ungar 1 Reputation point
2021-10-24T15:39:05.11+00:00

whenever I run commands in the cloud shell, I always get this message:

New Azure CLI version available. Running 'az upgrade' to update automatically.
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Your current Azure CLI version is 2.29.0. Latest version available is 2.29.1.
Please check the release notes first: https://learn.microsoft.com/cli/azure/release-notes-azure-cli
Do you want to continue? (Y/n):

then when I type Y, I get this

az upgrade is not supported in Cloud Shell.
Auto upgrade failed with exit code 0

even running az upgrade manually gets the same error
the commands seem to complete successfully, but these popups are really annoying
any help would be appreciated,
thanks

Azure Cloud Services
Azure Cloud Services
An Azure platform as a service offer that is used to deploy web and cloud applications.
774 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Andreas Baumgarten 123.6K Reputation points MVP Volunteer Moderator
    2021-10-24T16:57:53.9+00:00

    HI @Abe Ungar ,

    you could try az upgrade in a PowerShell session (not an Azure CLI session). Here this worked without any issues.

    If this is not working install the Azure CLI this way: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-windows?tabs=azure-cli

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten

    0 comments No comments

  2. Abe Ungar 1 Reputation point
    2021-10-24T17:49:30.3+00:00

    Hi AndreasBaumgarten, thanks for responding
    az upgrade works in powershell and azure cli on windows,
    but it doesn't work in cloud shell, with powershell nor bash

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.