Maybe you’ve already heard about Microsoft Graph and the Graph API. Microsoft Graph is the way resources in the Microsoft cloud are connected to each other. The Graph API is an API you can use to access Microsoft Graph, and browse (or traverse) through all the resources.
You can use the Graph API when building your own applications, but Microsoft is moving all their apps, tools etc. to the Graph API as well.
Azure Active Directory PowerShell v2 is moving from the Azure AD API’s to the Graph API as well. This automatically implies that Azure AD PowerShell v2 comes with new cmdlets and new options. The output of these cmdlets should be similar of course (creating a new domain, group or user in Azure Active Directory), but that these cmdlets are in no way compatible with the old Azure AD PowerShell.
Unfortunately, you have no choice then moving to Azure AD PowerShell v2. The existing PowerShell v1 will of course be supported for quite some time as it is impossible for everyone to convert their processes, cmdlets, scripts etc. from one version to another.
Note. We’ve seen similar when Microsoft moved from Azure ASM to Azure ARM. It has been taken years for Microsoft to move everything to ARM, so no worries for end-of-support scenarios anytime soon.
Installing Azure AD PowerShell v2 is easy, just install the module using the Install-Module command. This will download the module from the PowerShell repository.
When executed you will receive a notification about an untrusted repository. Click [Y] or [A] to continue. The module will be downloaded and installed.
You can use the following commands to store the credentials of your Office 365 and/or Azure tenant administrator account and use it to login to Azure Active Directory:
$AzureADCred = Get-Credential <your tenant admin><p>Connect-AzureAD -Credential $AzureADCred
You’ve now installed the Azure Active Directory PowerShell v2 module and are logged on to your tenant. If you want to retrieve a list of all new v2 PowerShell commands use can use the Get-Command command:
In future blogposts I will continue with the Azure AD PowerShell v2 module.
- AzureAD – https://docs.microsoft.com/en-us/powershell/module/Azuread/?view=azureadps-2.0
- Azure Active Directory PowerShell Version 2 – https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-adv2?view=azureadps-2.0
- Microsoft Graph – https://developer.microsoft.com/en-us/graph
- Overview of Microsoft Graph – https://developer.microsoft.com/en-us/graph/docs/concepts/overview
- Azure AD Graph API – https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-graph-api
- Microsoft Graph or the Azure AD Graph – https://dev.office.com/blogs/microsoft-graph-or-azure-ad-graph
<updated on March 21, 2018>