Open a terminal (if you are on Windows, use PowerShell) and execute the following command:
az login
It will open a browser window and ask you to log in to your Microsoft account. Once done, it will ask you to select your subscription, select the appropriate organization / subscription. You should be logged in successfully after you have selected your subscription.