- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to log in to the Azure account using Az CLI command in PowerShell?
To login to the Azure account using Azure CLI, we need to use the az login command. Once you type the az login command, it will prompt for the Azure portal login console.
If you need to log in with the device authentication code in the browser, you need to use the parameter –use-device-code.
PS C:\> az login --use-device-code To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code ‘DeviceCode’ to authenticate.
You need to open a website https://microsoft.com/devicelogin/ and have to enter a code. If you are not already connected with the Microsoft Azure portal, you need to log in first.
You can also provide the username and password in the command line as shown below.
PS C:\> az login --username azureusername --password azurepassword
If the password is not provided, it will prompt for the secret password.
PS C:\> az login --username azureuseraccount Password:
Advertisements