{{tag>microsoft powershell azure}} ====== Connect to Microsoft Azure AD via powershell ====== This is for multifactor authentication. 1. Open Powershell as Admin. 2. Install module: Install-Module MSOnline 3. Connect and check if it is successful Connect-MsolService Get-MsolUser You should get a list of users and their emails. 4. Install the correct module. Usually this is Install-module AzureAD However preview is requried for example [[wiki:restrict_microsoft_teams_groups_creation|this setup]]. Install-module AzureADPreview 5. Connect to Azure: Connect-AzureAD This should open a window to login. ====== Tested on ====== * Windows 10 64-bit * Powershell 5.1.18362.628 ====== See also ====== * [[wiki:restrict_microsoft_teams_groups_creation|Restrict Microsoft Teams or Groups creation]] * [[wiki:connect_exchange_online_microsoft_powershell|Connect to Exchange Online with Microsoft Powershell]] ====== References ====== * https://docs.microsoft.com/en-us/microsoft-365/enterprise/connect-to-microsoft-365-powershell?redirectedfrom=MSDN&view=o365-worldwide#connectv2