{"id":997,"date":"2016-09-13T15:23:44","date_gmt":"2016-09-13T14:23:44","guid":{"rendered":"https:\/\/www.lieben.nu\/liebensraum\/?p=997"},"modified":"2016-09-13T15:23:44","modified_gmt":"2016-09-13T14:23:44","slug":"removing-onmicrosoft-com-and-mail-onmicrosoft-com-aliases-from-all-groups-users-and-contacts-in-your-active-directory","status":"publish","type":"post","link":"https:\/\/lieben.nu\/liebensraum\/2016\/09\/removing-onmicrosoft-com-and-mail-onmicrosoft-com-aliases-from-all-groups-users-and-contacts-in-your-active-directory\/","title":{"rendered":"Removing .onmicrosoft.com and .mail.onmicrosoft.com aliases from all groups, users and contacts in your Active Directory"},"content":{"rendered":"<p>My current customer had a little dabble in Office 365, they set up their Hybrid configuration and added their @xxx.onmicrosoft.com email alias to all their users and groups. This mostly happens automatically.<\/p>\n<p>They then later decided to go with a new, different Office 365 tenant for production purposes, the old tenant was dismantled and the AADConnect server was deleted.<\/p>\n<p>However, all AD objects still had their alias for the old Office 365 tenant, syncing that to the new tenant would be a bad idea and I cleaned that up just to be sure it wouldn&#8217;t cause trouble in the future, here&#8217;s how I did that:<\/p>\n<p><a href=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2016\/09\/cleanupAllADObjectProxyAddresses.ps1\">cleanupAllADObjectProxyAddresses.ps1<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>My current customer had a little dabble in Office 365, they set up their Hybrid configuration and added their @xxx.onmicrosoft.com email alias to all their users and groups. This mostly happens automatically. They then later decided to go with a new, different Office 365 tenant for production purposes, the old tenant was dismantled and the &hellip; <a href=\"https:\/\/lieben.nu\/liebensraum\/2016\/09\/removing-onmicrosoft-com-and-mail-onmicrosoft-com-aliases-from-all-groups-users-and-contacts-in-your-active-directory\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Removing .onmicrosoft.com and .mail.onmicrosoft.com aliases from all groups, users and contacts in your Active Directory<\/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-997","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\/997","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=997"}],"version-history":[{"count":0,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/997\/revisions"}],"wp:attachment":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/media?parent=997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/categories?post=997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/tags?post=997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}