{"id":1616,"date":"2016-12-20T14:01:16","date_gmt":"2016-12-20T13:01:16","guid":{"rendered":"https:\/\/www.lieben.nu\/liebensraum\/?p=1616"},"modified":"2016-12-20T14:01:16","modified_gmt":"2016-12-20T13:01:16","slug":"copy-local-ad-contacts-to-o365","status":"publish","type":"post","link":"https:\/\/lieben.nu\/liebensraum\/2016\/12\/copy-local-ad-contacts-to-o365\/","title":{"rendered":"Copy local AD contacts to O365"},"content":{"rendered":"<p>Recently I needed a basic method to copy over contacts from a local AD to O365, and in cases where a read-write contact already exists; update it. The scenario made sense, as we were working with multiple source AD&#8217;s where some had contacts of each other&#8217;s mail users, causing adsync conflicts. Thus we decided to take contacts out of ADsync scope and just copy them once.<\/p>\n<p>The logic of the attached script is as follows:<\/p>\n<p><a href=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2016\/12\/O365ContactImport.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1617 alignleft\" src=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2016\/12\/O365ContactImport.png\" alt=\"\" width=\"314\" height=\"351\" srcset=\"https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2016\/12\/O365ContactImport.png 645w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2016\/12\/O365ContactImport-268x300.png 268w\" sizes=\"auto, (max-width: 314px) 100vw, 314px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Note that the script ONLY imports the displayname, primary and all secondary email addresses, and sets an extra X500 address for the legacy exchangeDN to avoid outlook cache hit misses.<\/p>\n<p>If you need it, here&#8217;s a download link:<\/p>\n<p><a href=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2016\/12\/O365ContactImporter.ps1\">O365ContactImporter.ps1<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I needed a basic method to copy over contacts from a local AD to O365, and in cases where a read-write contact already exists; update it. The scenario made sense, as we were working with multiple source AD&#8217;s where some had contacts of each other&#8217;s mail users, causing adsync conflicts. Thus we decided to &hellip; <a href=\"https:\/\/lieben.nu\/liebensraum\/2016\/12\/copy-local-ad-contacts-to-o365\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Copy local AD contacts to O365<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[18,32,39],"tags":[],"class_list":["post-1616","post","type-post","status-publish","format-standard","hentry","category-exchange-online","category-office-365","category-powershell"],"_links":{"self":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/1616","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/comments?post=1616"}],"version-history":[{"count":0,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/1616\/revisions"}],"wp:attachment":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/media?parent=1616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/categories?post=1616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/tags?post=1616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}