Direct Inward Dialing: +1 408 916 9890
Starting on March 31, 2025, Microsoft's AzureAD and MSOnline PowerShell modules will be deprecated completely, rendering popular and existing cmdlets useless. However, there are replacements for your scripts and your hard work. The official solution from Microsoft is to migrate to the Graph PowerShell SDK, a modern rendition of the deprecated modules.
In this blog, we will check out the reason behind this deprecation, how to migrate to the new Microsoft Graph PowerShell module, where you can find commonly used Microsoft Graph PowerShell cmdlets, and how there's a better alternative to scripting for your routine tasks and automations.
Microsoft has set March 31, 2025, as the final date for support of the AzureAD PowerShell and MSOnline PowerShell modules. This deprecation is intended to consolidate functionalities spread across multiple services and APIs under the Microsoft Graph framework.
By retiring older modules in favor of Microsoft Graph PowerShell SDK, Microsoft ensures administrators have access to a single, modern, and continually updated API layer for identity and Microsoft 365 services—bringing together improved features, consistent authentication, more granular permissions, and overall future-proofing of automation and scripting scenarios.
Apart from the extended support offered for GraphAPI, there are other benefits to switching over from AzureAD PowerShell:
Since the AzureAD and MSOnline PowerShell modules will not work beginning on March 31, 2025, you will have to install the Microsoft Graph PowerShell module and use new cmdlets to keep your existing management and automation scripts up and running.
You can install the Microsoft Graph PowerShell module by following these steps:
Once installed, run Connect-MgGraph to connect to the Microsoft Graph module.
Most of the Microsoft Graph PowerShell cmdlets are derivatives of existing AzureAD PowerShell cmdlets, albeit with a different prefix. For example, New-AzureADUser is replaced with New-MgUser; Get-AzureADUser is replaced with Get-MgUser; and Set-AzureADUser is replaced with Update-MgUser.
Start your Microsoft Graph PowerShell journey with some of the widely-used cmdlets linked below:
If you wish to just get a list of all new cmdlets, you can refer to Microsoft's guide on migrating to GraphAPI.
While the migration from AzureAD PowerShell to Microsoft Graph PowerShell is a vast improvement in security and granularity, it still inherits most of AzureAD PowerShell's flaws and drawbacks. Some of them include:
Relying on Microsoft Graph PowerShell scripts can be time consuming and prone to errors. If you wish to overcome these obstacles in your day-to-day Microsoft 365 administration, ManageEngine's M365 Manager Plus might be what you need!
ManageEngine M365 Manager Plus is a comprehensive administration and security solution used for reporting, managing, monitoring, auditing, and creating alerts for critical activities in your Microsoft 365 environments.
Easily manage users, groups, contacts , mailboxes, teams, and sites in bulk without Graph PowerShell scripting. Automate repetitive tasks in Microsoft 365—such as user provisioning, group cleanups, site management, and more—with a no-code approach to save time and minimize errors in your lifecycle management processes.
You can also gain a thorough understanding of your environment—not just in Microsoft Entra ID, but also Exchange Online, SharePoint Online, OneDrive for Business, and other Microsoft 365 services—with detailed reports and intuitive visualizations, all from a single console. You can also create data filters and save them as custom reports that you can access in just a few clicks.
There are even more benefits to using M365 Manager Plus to manage and monitor your Microsoft 365 environment: