Comments on: How to Permanently Remove Deleted Microsoft 365 Users from Azure AD https://practical365.com/permanently-remove-deleted-office-365-users/ Practical Office 365 News, Tips, and Tutorials Thu, 12 Oct 2023 20:21:09 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_270978'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_270978"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/permanently-remove-deleted-office-365-users/#comment-270978 Wed, 02 Aug 2023 13:59:46 +0000 https://practical365.com/?p=53091#comment-270978 In reply to Michael Lang.

If you purge an account and recreate it, you can assign the same UPN but the new account won’t have the same object identifier as the original. That will be your problem because the workloads use object identifiers (GUIDs, so always unique) to link data together. But I would push back on Microsoft support and ask for further help. If there’s a problem with an account, they should be able to figure out why. I assume that you didn’t do anything to cause the problem, which would then allow Microsoft off the hook…

If you want to delete and recreate, backup everything first. You could do a content search to find everything in the account (assuming Office 365 E3 or above) and export it to a PST (mailbox) and individual files (OneDrive). Then use that data to recreate information for the new account.

But all of this is expressed with the strong caveat that I do not know the precise details of your circumstances, which is why you should work with Microsoft support as they can sign into your tenant to see what’s happening there.

]]>
By: Michael Lang https://practical365.com/permanently-remove-deleted-office-365-users/#comment-270976 Wed, 02 Aug 2023 13:51:08 +0000 https://practical365.com/?p=53091#comment-270976 Tony, I have a user who has an issue with their account. It seems to think there’s an On-Prem Exchange server. Its only one user affected here. But Microsoft wont help because they say it says managed. While I could do a purge of the user like this and then add them back to solve the issue, I have concerns because I don’t want them to lose their data in email and OneDrive etc. If I purge the account and recreate it, will Microsoft note the same upn and restore the data to that account?

]]>
By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_266874'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_266874"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/permanently-remove-deleted-office-365-users/#comment-266874 Wed, 21 Jun 2023 22:38:01 +0000 https://practical365.com/?p=53091#comment-266874 In reply to Eric.

BTW, here’s another approach: https://office365itpros.com/2022/03/23/delete-azure-ad-user-accounts/

]]>
By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_266871'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_266871"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/permanently-remove-deleted-office-365-users/#comment-266871 Wed, 21 Jun 2023 22:19:43 +0000 https://practical365.com/?p=53091#comment-266871 In reply to Eric.

All true. The Graph API for users returns 100 objects by default. If you want more, you’ve got to ask for them.

]]>
By: Eric https://practical365.com/permanently-remove-deleted-office-365-users/#comment-266800 Wed, 21 Jun 2023 21:34:36 +0000 https://practical365.com/?p=53091#comment-266800 This article was beneficial. Thank you. If anyone has a list larger than 100 users, it will not be displayed. The output is truncated at 100. Using the code shown in this article, it can be solved by just modifying this one line – $Uri = “https://graph.microsoft.com/V1.0/directory/deletedItems/microsoft.graph.user?`$top=999” You need the ` to escape the $ in PowerShell. 999 is the largest value that can be used. Other methods can be used, such as Invoke-RestMethod to output @odata.nextlink, which is where the rest of the results are stored if your list exceeds 999 values.

]]>
By: Frank Cifelli https://practical365.com/permanently-remove-deleted-office-365-users/#comment-237659 Wed, 02 Feb 2022 17:13:48 +0000 https://practical365.com/?p=53091#comment-237659 Thanks for posting this. It worked as described.

]]>
By: Jose Aguinaga https://practical365.com/permanently-remove-deleted-office-365-users/#comment-237241 Thu, 02 Dec 2021 21:04:02 +0000 https://practical365.com/?p=53091#comment-237241 In reply to Tony Redmond.

Thank you so much!

]]>
By: Tony Redmond https://practical365.com/permanently-remove-deleted-office-365-users/#comment-237237 Thu, 02 Dec 2021 16:46:11 +0000 https://practical365.com/?p=53091#comment-237237 In reply to Jose Aguinaga.

Both are functionally the same and remove a user account object permanently from Azure AD. The Remove-MsOlUser cmdlet is just older. The other is based on the Azure AD Graph (which will be replaced by the Microsoft Graph in due course).

]]>
By: Jose Aguinaga https://practical365.com/permanently-remove-deleted-office-365-users/#comment-237224 Wed, 01 Dec 2021 20:46:40 +0000 https://practical365.com/?p=53091#comment-237224 Thanks for the information Tony, but I have a doubt, what is the difference between “Remove-MsolUser -UserPrincipalName -RemoveFromRecycleBin” and “Remove-AzureADMSDeletedDirectoryObject -Id 1368fd78-c2b4-4e14-8e69-65dddc432451”? I’m really a noobie about it

]]>
By: <div class="apbct-real-user-wrapper"> <div class="apbct-real-user-author-name">Tony Redmond</div> <div class="apbct-real-user-badge" onmouseover=" let popup = document.getElementById('apbct_trp_comment_id_237151'); popup.style.display = 'inline-flex'; "> <div class="apbct-real-user-popup" id="apbct_trp_comment_id_237151"> <div class="apbct-real-user-title"> <p class="apbct-real-user-popup-header">The Real Person!</p> <p class="apbct-real-user-popup-text">Author <b>Tony Redmond</b> acts as a real person and passed all tests against spambots. Anti-Spam by CleanTalk.</p> </div> </div> </div> </div> https://practical365.com/permanently-remove-deleted-office-365-users/#comment-237151 Mon, 22 Nov 2021 09:46:29 +0000 https://practical365.com/?p=53091#comment-237151 In reply to Terry.

Yep. Hopefully, Microsoft will make this a non-preview feature very soon.

]]>