{"id":571,"date":"2016-03-25T00:06:53","date_gmt":"2016-03-25T00:06:53","guid":{"rendered":"https:\/\/regroove.ca\/stellark\/?p=571"},"modified":"2023-02-24T18:51:36","modified_gmt":"2023-02-24T18:51:36","slug":"recreate-a-deleted-user-in-ad-and-sync-to-office365","status":"publish","type":"post","link":"https:\/\/regroove.ca\/stellark\/2016\/03\/25\/recreate-a-deleted-user-in-ad-and-sync-to-office365\/","title":{"rendered":"Recreate a Deleted User in AD and Sync to Office365"},"content":{"rendered":"<h2>Scenario<\/h2>\n<p>You have Directory Synchronization configured in your domain and on occasion you need to delete a synced user in AD then recreate the account.<\/p>\n<p>Here are the steps required in order to enable successful synchronization of the recreated AD account to Office 365.<\/p>\n<p>&nbsp;<\/p>\n<h2>Step 1<\/h2>\n<p>Delete the user account from AD and perform a sync in order to also remove the user from O365.&nbsp; The cloud account will move to the Deleted users area in O365<\/p>\n<p>&nbsp;<\/p>\n<h2>Step 2<\/h2>\n<p>In Office365 restore the user from \u201cDeleted Users\u201d area.&nbsp; After it has been restored the user will show up as \u201cin cloud\u201d vs. \u201csynced with Active Directory\u201d<\/p>\n<p>&nbsp;<\/p>\n<h2>Step 3<\/h2>\n<p>Recreate the account in AD.&nbsp; Ensure that you have filled in the Email section and the Proxy Address for Primary mail account via user object properties and Attribute Editor tab.<\/p>\n<p>&nbsp;<\/p>\n<h3><font style=\"font-weight: bold\">Now for the nifty part\u2026Hard Matching using the AD user ObjectGuid<\/font><\/h3>\n<p>&nbsp;<\/p>\n<h2>Step 4<\/h2>\n<p>Open the AD user object properties and Attribute Editor tab.&nbsp; Search for Distinguished name and copy the path.<\/p>\n<p>ldifde -d &#8220;CN=Someone,OU=Users,DC=someplace,DC=com&#8221; -f c:\\User.txt<\/p>\n<p>&nbsp;<\/p>\n<h2>Step 5<\/h2>\n<p>Open the text file you created in Step 4 and copy the user\u2019s ObjectGUID&nbsp; EG: 5WyOPyLejk2wiSyVaLQSGw==<\/p>\n<p>&nbsp;<\/p>\n<h2>Step 6<\/h2>\n<p>Open PowerShell and update the Cloud users ImmutableID with the ObjectGuid of the AD domain user you copied in Step 5<\/p>\n<p>Set-MsolUser \u2013UserPrincipalName <a href=\"mailto:someone@someplace.com\">someone@someplace.com<\/a> -ImmutableId &#8220;5WyOPyLejk2wiSyVaLQSGw==\u201d<\/p>\n<p>&nbsp;<\/p>\n<h2>Step 7<\/h2>\n<p>In PowerShell check that the new ImmutableID has been applied<\/p>\n<p>Get-MsolUser \u2013UserPrincipalName <a href=\"mailto:someone@someplace.com\">someone@someplace.com<\/a> | FT name,ImmutableID<\/p>\n<p>&nbsp;<\/p>\n<h2>Step 8<\/h2>\n<p>Run a synchronization and confirm successful sync.&nbsp; The cloud user will again become \u201csynced with Active Directory\u201d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Scenario You have Directory Synchronization configured in your domain and on occasion you need to delete a synced user in AD then recreate the account. Here are the steps required in order to enable successful synchronization of the recreated AD account to Office 365. &nbsp; Step 1 Delete the user account from AD and perform &hellip; <a href=\"https:\/\/regroove.ca\/stellark\/2016\/03\/25\/recreate-a-deleted-user-in-ad-and-sync-to-office365\/\"><\/a><\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[5,33,42,45,60],"tags":[102,137,151,154,173],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Recreate a Deleted User in AD and Sync to Office365 - Stephanie Kahlam<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/regroove.ca\/stellark\/2016\/03\/25\/recreate-a-deleted-user-in-ad-and-sync-to-office365\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Recreate a Deleted User in AD and Sync to Office365 - Stephanie Kahlam\" \/>\n<meta property=\"og:description\" content=\"Scenario You have Directory Synchronization configured in your domain and on occasion you need to delete a synced user in AD then recreate the account. Here are the steps required in order to enable successful synchronization of the recreated AD account to Office 365. &nbsp; Step 1 Delete the user account from AD and perform &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/regroove.ca\/stellark\/2016\/03\/25\/recreate-a-deleted-user-in-ad-and-sync-to-office365\/\" \/>\n<meta property=\"og:site_name\" content=\"Stephanie Kahlam\" \/>\n<meta property=\"article:published_time\" content=\"2016-03-25T00:06:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-24T18:51:36+00:00\" \/>\n<meta name=\"author\" content=\"Stephanie Kahlam\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Stephanie Kahlam\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/regroove.ca\/stellark\/2016\/03\/25\/recreate-a-deleted-user-in-ad-and-sync-to-office365\/\",\"url\":\"https:\/\/regroove.ca\/stellark\/2016\/03\/25\/recreate-a-deleted-user-in-ad-and-sync-to-office365\/\",\"name\":\"Recreate a Deleted User in AD and Sync to Office365 - Stephanie Kahlam\",\"isPartOf\":{\"@id\":\"https:\/\/regroove.ca\/stellark\/#website\"},\"datePublished\":\"2016-03-25T00:06:53+00:00\",\"dateModified\":\"2023-02-24T18:51:36+00:00\",\"author\":{\"@id\":\"https:\/\/regroove.ca\/stellark\/#\/schema\/person\/175e89cb69612178b2ac838c0bab6149\"},\"breadcrumb\":{\"@id\":\"https:\/\/regroove.ca\/stellark\/2016\/03\/25\/recreate-a-deleted-user-in-ad-and-sync-to-office365\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/regroove.ca\/stellark\/2016\/03\/25\/recreate-a-deleted-user-in-ad-and-sync-to-office365\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/regroove.ca\/stellark\/2016\/03\/25\/recreate-a-deleted-user-in-ad-and-sync-to-office365\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Stellark Home\",\"item\":\"https:\/\/regroove.ca\/stellark\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Recreate a Deleted User in AD and Sync to Office365\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/regroove.ca\/stellark\/#website\",\"url\":\"https:\/\/regroove.ca\/stellark\/\",\"name\":\"Stephanie Kahlam\",\"description\":\"Microsoft 365 and SMB.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/regroove.ca\/stellark\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/regroove.ca\/stellark\/#\/schema\/person\/175e89cb69612178b2ac838c0bab6149\",\"name\":\"Stephanie Kahlam\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/regroove.ca\/stellark\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/398b95e23dc9eaf37a780b86a239b485?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/398b95e23dc9eaf37a780b86a239b485?s=96&d=mm&r=g\",\"caption\":\"Stephanie Kahlam\"},\"url\":\"https:\/\/regroove.ca\/stellark\/author\/skahlam\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Recreate a Deleted User in AD and Sync to Office365 - Stephanie Kahlam","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/regroove.ca\/stellark\/2016\/03\/25\/recreate-a-deleted-user-in-ad-and-sync-to-office365\/","og_locale":"en_US","og_type":"article","og_title":"Recreate a Deleted User in AD and Sync to Office365 - Stephanie Kahlam","og_description":"Scenario You have Directory Synchronization configured in your domain and on occasion you need to delete a synced user in AD then recreate the account. Here are the steps required in order to enable successful synchronization of the recreated AD account to Office 365. &nbsp; Step 1 Delete the user account from AD and perform &hellip;","og_url":"https:\/\/regroove.ca\/stellark\/2016\/03\/25\/recreate-a-deleted-user-in-ad-and-sync-to-office365\/","og_site_name":"Stephanie Kahlam","article_published_time":"2016-03-25T00:06:53+00:00","article_modified_time":"2023-02-24T18:51:36+00:00","author":"Stephanie Kahlam","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Stephanie Kahlam","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/regroove.ca\/stellark\/2016\/03\/25\/recreate-a-deleted-user-in-ad-and-sync-to-office365\/","url":"https:\/\/regroove.ca\/stellark\/2016\/03\/25\/recreate-a-deleted-user-in-ad-and-sync-to-office365\/","name":"Recreate a Deleted User in AD and Sync to Office365 - Stephanie Kahlam","isPartOf":{"@id":"https:\/\/regroove.ca\/stellark\/#website"},"datePublished":"2016-03-25T00:06:53+00:00","dateModified":"2023-02-24T18:51:36+00:00","author":{"@id":"https:\/\/regroove.ca\/stellark\/#\/schema\/person\/175e89cb69612178b2ac838c0bab6149"},"breadcrumb":{"@id":"https:\/\/regroove.ca\/stellark\/2016\/03\/25\/recreate-a-deleted-user-in-ad-and-sync-to-office365\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/regroove.ca\/stellark\/2016\/03\/25\/recreate-a-deleted-user-in-ad-and-sync-to-office365\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/regroove.ca\/stellark\/2016\/03\/25\/recreate-a-deleted-user-in-ad-and-sync-to-office365\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Stellark Home","item":"https:\/\/regroove.ca\/stellark\/"},{"@type":"ListItem","position":2,"name":"Recreate a Deleted User in AD and Sync to Office365"}]},{"@type":"WebSite","@id":"https:\/\/regroove.ca\/stellark\/#website","url":"https:\/\/regroove.ca\/stellark\/","name":"Stephanie Kahlam","description":"Microsoft 365 and SMB.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/regroove.ca\/stellark\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/regroove.ca\/stellark\/#\/schema\/person\/175e89cb69612178b2ac838c0bab6149","name":"Stephanie Kahlam","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/regroove.ca\/stellark\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/398b95e23dc9eaf37a780b86a239b485?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/398b95e23dc9eaf37a780b86a239b485?s=96&d=mm&r=g","caption":"Stephanie Kahlam"},"url":"https:\/\/regroove.ca\/stellark\/author\/skahlam\/"}]}},"_links":{"self":[{"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/posts\/571"}],"collection":[{"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/comments?post=571"}],"version-history":[{"count":1,"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/posts\/571\/revisions"}],"predecessor-version":[{"id":1428,"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/posts\/571\/revisions\/1428"}],"wp:attachment":[{"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/media?parent=571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/categories?post=571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/tags?post=571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}