Version 2025.11.2 of the AzureDataLakeManagement module migrates from the deprecated AzureAD PowerShell module to the Microsoft.Graph PowerShell SDK. This change is necessary for PowerShell 7+ compatibility and aligns with Microsoft's recommendations.
- AzureAD module is deprecated: Microsoft announced the deprecation of the AzureAD and MSOnline modules with retirement scheduled for late 2025
- PowerShell 7+ incompatibility: The AzureAD module only works with Windows PowerShell 5.1 and is not compatible with PowerShell Core (7+)
- Modern authentication: Microsoft Graph SDK uses MSAL (Microsoft Authentication Library) with better security and support for modern authentication methods
- Future-proof: Microsoft Graph is the unified endpoint for all Microsoft 365 services with regular updates
Before (v2025.11.1 and earlier):
# Required modules
- Az.Storage
- AzureAD
- Az.Accounts
After (v2025.11.2 and later):
# Required modules
- Az.Storage
- Microsoft.Graph.Applications
- Microsoft.Graph.Users
- Microsoft.Graph.Groups
- Microsoft.Graph.DirectoryObjects
Before:
Connect-AzAccount
Connect-AzureADAfter:
Connect-AzAccount
Connect-MgGraph -Scopes "User.Read.All", "Group.Read.All", "Application.Read.All"# Uninstall old AzureAD module (optional)
Uninstall-Module -Name AzureAD
# Install Microsoft Graph modules
Install-Module -Name Microsoft.Graph.Applications -Force
Install-Module -Name Microsoft.Graph.Users -Force
Install-Module -Name Microsoft.Graph.Groups -Force
Install-Module -Name Microsoft.Graph.DirectoryObjects -Force
# Or use the module's built-in dependency management
Import-Module AzureDataLakeManagement
Test-ModuleDependencies -AutoInstallReplace all instances of Connect-AzureAD with:
Connect-MgGraph -Scopes "User.Read.All", "Group.Read.All", "Application.Read.All"Note on Scopes:
User.Read.All: Required for reading user informationGroup.Read.All: Required for reading group informationApplication.Read.All: Required for reading service principal information
For production/automation scenarios, consider using certificate-based authentication:
Connect-MgGraph -ClientId "YOUR_CLIENT_ID" -TenantId "YOUR_TENANT_ID" -CertificateThumbprint "YOUR_CERT_THUMBPRINT"# Update to the latest version
Update-Module -Name AzureDataLakeManagement
# Verify version
Get-Module -Name AzureDataLakeManagement -ListAvailable | Select-Object Name, VersionAll public functions maintain the same parameters and behavior:
Get-AADObjectIdGet-AzureSubscriptionInfoAdd-DataLakeFolderRemove-DataLakeFolderSet-DataLakeFolderACLGet-DataLakeFolderACLMove-DataLakeFolderRemove-DataLakeFolderACL
The following cmdlet replacements were made internally:
Get-AzureADUser→Get-MgUserGet-AzureADGroup→Get-MgGroupGet-AzureADServicePrincipal→Get-MgServicePrincipalGet-AzureADObjectByObjectId→Get-MgDirectoryObject
# Solution: Install the required modules
Test-ModuleDependencies -AutoInstall# Solution: Connect to Microsoft Graph with appropriate scopes
Connect-MgGraph -Scopes "User.Read.All", "Group.Read.All", "Application.Read.All"# Solution: Ensure your account has the required permissions
# Or use delegated permissions with admin consent
Connect-MgGraph -Scopes "User.Read.All", "Group.Read.All", "Application.Read.All"If you experience issues:
- Verify PowerShell version:
$PSVersionTable.PSVersion - Check installed modules:
Get-Module -ListAvailable | Where-Object Name -match "Graph|Az" - Update all Az modules:
Update-Module -Name Az.* - Restart PowerShell session
# Import module
Import-Module AzureDataLakeManagement
# Check dependencies
Test-ModuleDependencies
# Authenticate
Connect-AzAccount
Connect-MgGraph -Scopes "User.Read.All", "Group.Read.All", "Application.Read.All"
# Test object lookup
Get-AADObjectId -Identity "user@yourdomain.com"# Test ACL retrieval (replace with your values)
Get-DataLakeFolderACL -SubscriptionName "YourSubscription" `
-ResourceGroupName "YourResourceGroup" `
-StorageAccountName "yourstorageaccount" `
-ContainerName "yourcontainer" `
-FolderPath "yourfolder"- Microsoft Graph PowerShell SDK Documentation
- Upgrade from Azure AD PowerShell to Microsoft Graph PowerShell
# Old way (AzureAD)
Get-AzureADUser -Filter "UserPrincipalName eq 'user@domain.com'"
# New way (Microsoft Graph)
Get-MgUser -Filter "UserPrincipalName eq 'user@domain.com'"
# Using the module (unchanged)
Get-AADObjectId -Identity "user@domain.com"# Old way (AzureAD)
Get-AzureADGroup -Filter "DisplayName eq 'GroupName'"
# New way (Microsoft Graph)
Get-MgGroup -Filter "DisplayName eq 'GroupName'"
# Using the module (unchanged)
Get-AADObjectId -Identity "GroupName"If you encounter any issues with the migration, please:
- Review this migration guide
- Check the GitHub Issues
- Create a new issue with details about your environment and the error
If you need to temporarily roll back to the old version:
# Install specific old version
Install-Module -Name AzureDataLakeManagement -RequiredVersion 2025.11.1 -Force
# Note: This is only a temporary solution as AzureAD module will be retiredImportant: The rollback is only temporary. You should plan to migrate to Microsoft.Graph as the AzureAD module will stop working when Microsoft completes the retirement.