How to Connect to Azure AD Using PowerShell (2 Easy Steps)

In this post, I’m going to show you how to connect to Azure AD using PowerShell.

I’ll also show you how to list all of the available commands from the AzureAD module.

Let’s get started.

Note: Your computer will need at least PowerShell version 5.1 to use the Azure AD module. Refer to the article update PowerShell version for instructions on upgrading PowerShell.

Step 1: Install Azure AD Module

Before you can connect to Azure AD with Powershell you first need to install the AzureAD module.

Open PowerShell on your local computer and enter the below command:

install-module AzureAD

You may get a popup that says “PowerShellGet requires NuGET provider version “” or newer”

Click yes to continue.

install azuread powershell module

You may also get a pop up that says “You are installing modules from an untrusted repository.”

Click Yes to continue.

untrusted repository powershell warning

The AzureAD module should now be installed.

You can verify that it is installed by running the below command:

Get-Module AzureAD -ListAvailable

If the module is installed you should see it listed like the screenshot below.

powershell command verify azuread module is installed

If you already have the AzureAD module installed you can update it with the below command:

Update-Module -Name AzureAD

Now that the module is installed and updated you can move to step 2.

Step 2: Connect to Azure AD Using PowerShell

To connect to Azure AD type the below command:


You will be prompted to sign in with your Azure AD credentials (MFA is supported).

connect to azuread with powershell

When successfully authenticated it will display your account and TenantID.

You should now be connected to Azure AD via PowerShell.

Pretty easy right?

To get a list of all the AzureAD cmdlets, use the command:

get-command -Module AzureAD

list all azure powershell cmdlets

We hope you found this tutorial helpful. And if so, you may be interested in these resources:

Leave a Comment