
The end of AzureAD and MSOnline PowerShell modules
- Maxime Hiez
- Entra ID
- 30 Jan, 2025
Introduction
Microsoft recently announced the general availability of the Microsoft Entra PowerShell module. This module offers administrators and IT professionals a new way to manage and automate tasks related to Microsoft Entra ID (formerly Azure Active Directory). This update marks an important step in simplifying identity and access management in cloud environments.
Timeline
In 2021, Microsoft announced that the next developments on PowerShell would focus on the Microsoft Graph PowerShell SDK.
Module | End of support | Retirement |
---|---|---|
AzureAD | March, 30 2025 | After July 1, 2025 |
MSOnline | March, 30 2025 | Early Apr 2025 to late May 2025 |
Benefits of migrating to Microsoft Graph
Microsoft Graph represents the best-in-breed API surface. It offers a single unified endpoint to access Microsoft Entra services and Microsoft 365 services such as Microsoft Teams and Microsoft Intune. All new functionalities will only be available through Microsoft Graph. Microsoft Graph is also more secure and resilient than Azure AD Graph.
Microsoft Graph has all the capabilities that have been available in Azure AD Graph and new APIs like identity protection and authentication methods. Its client libraries offer built-in support for features like retry handling, secure redirects, transparent authentication, and payload compression.
How to know if these modules are still used
Microsoft Entra sign-in logs can be used to identify connections from MSOnline and AzureAD PowerShell. They provide information about the client and user of the PowerShell session.
- Sign in to the Microsoft Entra Admin Center by opening your web browser to https://entra.microsoft.com.
- In the left menu, click Identity, then Monitoring & health and Sign-in logs.
- Select the User sign-ins (Interactive) tab, then click Add filters and choose the Application attribute.
- Enter Azure Active Directory PowerShell to apply the filter.
The MSOnline PowerShell and AzureAD PowerShell sign-in events appear with the application name Azure Active Directory PowerShell.
How to upgrade to the new version ?
You can install the new Entra module (API version /v1.0) via the following PowerShell command :
Install-Module -Name Microsoft.Entra -Repository PSGallery -Scope CurrentUser -Force -AllowClobber
Or install the beta version of the module via the following PowerShell command :
Install-Module -Name Microsoft.Entra.Beta -Repository PSGallery -Scope CurrentUser -Force -AllowClobber
Once installed, you can connect via the following PowerShell command :
Connect-Entra -Scopes 'User.Read.All'
If you have existing scripts that run with the AzureAD module, you can continue to use them with minimal modification by adding the Enable-EntraAzureADAlias command.
Import-Module -Name Microsoft.Entra.Users
Connect-Entra #Replaces Connect-AzureAD for auth
Enable-EntraAzureADAlias #Enable aliasing
Get-AzureADUser -Top 1
Conclusion
The general availability of the Microsoft Entra PowerShell module provides administrators with a powerful and flexible new way to manage identity and access in cloud environments. By automating common tasks and centralizing management, this module increases efficiency and security.
Sources
Did you enjoy this post ? If you have any questions, comments or suggestions, please feel free to send me a message from the contact form.
Don’t forget to follow us and share this post.