Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is difference between Azure AD Module and MS Online module

I am trying to understand difference between two modules, Azure AD and MS Online modules. Currently on my windows 10 machine I can use get-azureaccount cmdlet that returns my current Azure account. And there is bunch of cmdlets that I can use right now. Then why I need MS Online module.

Please help me to understand the purpose of these two modules.


1 Answers

Get-AzureAccount / Get-AzureRMAccount is a part of the "Azure" module.

When working with Azure AD (Active directory commands; not a part of the built-in modules) in Azure you will need the MSOnline module - which also happens to be the same module as for working with Office365. Usually MSOnline is referred to as the Azure Active Directory module for Windows Powershell.

Eg. if you install the Azure Active Directory module from example here: Microsoft - Active Directory Module for Windows Powershell 64-bit - you will get the MSOnline module installed on your machine. You can actually inspect / unpack the msi installer and you will see that the package here is Microsoft.Online.Administration.MSOnline.psd1

In order to work with Azure AD from Powershell, you'll then need to import this module (which contains a set of functions to work with Azure AD).

To list commands within this module after installing the module you can do the following:

Get-Command -Module MSOnline

Hope this clears the confusion.

like image 194
Harald F. Avatar answered Sep 15 '25 01:09

Harald F.