Knowledge base

February 07, 2025

MSOnline and AzureAD PowerShell modules obsolete

 

Microsoft has announced the official retirement of the MSOnline and AzureAD PowerShell modules¹. As of June 30, 2025, these modules will no longer be supported. It is important to take action in time to avoid any interruptions in your processes.

What does this change entail? 🤔

  • The MSOnline and AzureAD PowerShell modules are being replaced by the Microsoft Graph PowerShell SDK².
  • Microsoft Graph provides modern APIs that better suit the needs of organizations and offer more features than older modules.
  • After June 30, 2025, scripts that rely on these obsolete modules may no longer work.

 

 

Why switch to Microsoft Graph PowerShell? 💡

The new Graph PowerShell SDK offers several important advantages:

  • 🌟 Future-proof: Graph is the API of the future for Microsoft 365 and Azure AD.
  • 🚀 More functionality: Access to more Microsoft 365 services and capabilities.
  • 🔒 Better security: More modern and secure authentication methods.
  • 🔄 Cross-platform support: Graph PowerShell works on Windows, macOS and Linux.

 

 

How can you make the switch? 🛠️

  1. Install Microsoft Graph PowerShell:
    Download the Graph SDK using the following PowerShell command:

    Install-Module Microsoft.Graph -Scope CurrentUser
  2. Learn the new cmdlets:
    • Graph PowerShell uses different cmdlets than MSOnline and AzureAD.
    • See the official Microsoft documentation² for an overview.
  3. Convert your existing scripts:
    • Analyze your current PowerShell scripts that depend on the old modules.
    • You can use the Microsoft Entra sign-in logs³ to identify PowerShell logins that depend on the MSOnline and AzureAD modules. Filter the logs by the application name Azure Active Directory PowerShell for both interactive and non-interactive user sessions in the Entra Admin Center.
    • Replace obsolete cmdlets with the new Graph cmdlets.
  4. Test your scripts thoroughly:
    • Run your scripts in a test environment to make sure everything works correctly with Graph PowerShell.
  5. Secure access with modern authentication:
    • Use token-based authentication instead of outdated methods.

 

 

Important deadlines 🗓️

  • Now available: Start using the Microsoft Graph PowerShell SDK.
  • Until June 30, 2025: The MSOnline and AzureAD modules will remain available, but will no longer be actively developed.
  • After June 30, 2025: Modules will be phased out permanently.

 

 

Conclusion ✅

The phase-out of the MSOnline and AzureAD modules is an opportunity to modernize your PowerShell knowledge and future-proof your processes. Start implementing Microsoft Graph PowerShell today so you don’t have any surprises later. 💪

Have questions or need help making the switch? Let us know! ✉️

 

 

References

 

¹https://techcommunity.microsoft.com/blog/identity/action-required-msonline-and-azuread-powershell-retirement—2025-info-and-resou/4364991

²https://learn.microsoft.com/nl-nl/powershell/microsoftgraph/get-started?view=graph-powershell-1.0

³https://learn.microsoft.com/entra/identity/monitoring-health/concept-sign-ins

 

 

About the author

My name is Alta Martes, a specialist in Microsoft 365 and Google Workspace, with a focus on modern workplace management, cloud security and identity & access management. With years of experience, I help organizations optimize their IT infrastructure and create a secure, efficient digital workplace.

🎯 Need help with your Microsoft 365 strategy?
Click below and find out how we can support your organization:

Want to know more?

Get in touch
PowerShell-script migratie naar Microsoft Graph API met focus op verbeterde beveiliging en functionaliteit.