Command let provided by MS has a rate limit.
Get-MgDirectoryDeletedItem -DirectoryObjectId microsoft.graph.user -Property '*'
Above Mg Graph command let returning only 100(max) values. However, i have around 1000 values in the deleted list. Also, it do not take "-All", "Page Size" etc properties.
Any guidance on how can i get the list all deleted users via PowerShell?
Mg Graph command let returning only 100(max) values. However, i have around 1000 values in the deleted list. Also, it do not take "-All", "Page Size" etc properties.
Here is the command to get more than 100 Azure AD
deleted users.
Powershell Comamnd:
Install-Module Microsoft.Graph.Identity.DirectoryManagement
Get-MgDirectoryDeletedItemAsUser -PageSize 114 | Export-Csv -Path "C:\ZipFolder\AzureADuserdel-27-2023.csv"
MS Graph Result:
Note: PageSize 114 define the number as per your requirement.
Once the above command is run, it will fetch deleted Azure AD
users and export them to an excel file as below.
Output:
Reference: Retrieve the count of deleted user