I think you are trying with Linux CLI. At the time of login to Azure, it will redirect to the Azure portal. So you need to log in from the Linux GUI. After login successfully, you can use Linux CLI.
Hope it helps!
To know more about Azure, join Azure architect certification course today.