{"id":9520,"date":"2026-03-31T05:01:43","date_gmt":"2026-03-31T05:01:43","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=9520"},"modified":"2026-03-31T05:01:44","modified_gmt":"2026-03-31T05:01:44","slug":"how-to-delete-a-user-from-365","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/how-to-delete-a-user-from-365","title":{"rendered":"How to Delete a User from 365"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code class=\"\"># 1 - Get mailbox details\nGet-Mailbox -SoftDeletedMailbox -Identity \"james\" | Select Name, ExternalDirectoryObjectId, PrimarySmtpAddress\n\n# 2 - Remove from Entra ID recycle bin\nRemove-MgDirectoryDeletedItem -DirectoryObjectId \"xxxxxxxxxxxxxxxxxxxxxx\"\n\n# 3 - Exclude from all holds\nSet-Mailbox -Identity \"xxxxxxxxxxxxxxxxxxxxxx\" -ExcludeFromAllHolds\n\n# 4 - Wait for hold removal to propagate\nStart-Sleep -Seconds 60\n\n# 5 - Permanently delete\nRemove-Mailbox -Identity \"xxxxxxxxxxxxxxxxxxxxxx\" -PermanentlyDelete:$true -Confirm:$false<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9520","post","type-post","status-publish","format-standard","hentry","category-research"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/9520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=9520"}],"version-history":[{"count":1,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/9520\/revisions"}],"predecessor-version":[{"id":9521,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/9520\/revisions\/9521"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=9520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=9520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=9520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}