{"id":564,"date":"2017-10-05T14:12:02","date_gmt":"2017-10-05T12:12:02","guid":{"rendered":"https:\/\/msb365.abstergo.ch\/?p=564"},"modified":"2023-06-23T13:12:46","modified_gmt":"2023-06-23T11:12:46","slug":"error-moving-mailbox-exchange-online","status":"publish","type":"post","link":"https:\/\/www.msb365.blog\/?p=564","title":{"rendered":"Error when moving a mailbox to Exchange online"},"content":{"rendered":"<p>In a project I was running some time ago, one of the main Tasks was to move on-premise Mailboxes to Exchange online. The migration went more or less smooth, but there was one mailbox which I wasn\u2019t able to migrate.<\/p>\n<p>By checking the migration status with Powershell:<\/p>\n<pre>Get-MigrationUser -BatchId <BATCH ID> | Get-MigrationUserStatistics<\/pre>\n<p>I got the following output:<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-566\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/1.png\" alt=\"\" width=\"804\" height=\"81\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/1.png 804w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/1-600x60.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/1-300x30.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/1-768x77.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/1-780x79.png 780w\" sizes=\"(max-width: 804px) 100vw, 804px\" \/><\/p>\n<p>After connecting to Exchange online portal, I opened the current Job and I got the following error message:<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-567\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/2-991x1024.png\" alt=\"\" width=\"497\" height=\"514\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/2-991x1024.png 991w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/2-600x620.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/2-290x300.png 290w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/2-768x794.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/2-780x806.png 780w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/2.png 1104w\" sizes=\"(max-width: 497px) 100vw, 497px\" \/><\/p>\n<p>The fix is quiet easy just follow the steps:<\/p>\n<p>Open the Exchange Management Shell from the on-prem server and run the following command to find out what the on-prem Exchange GUID is.<\/p>\n<pre>Get-Mailbox <MailboxName> | Format-List ExchangeGUID<\/pre>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-568\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/3.png\" alt=\"\" width=\"370\" height=\"62\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/3.png 370w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/3-300x50.png 300w\" sizes=\"(max-width: 370px) 100vw, 370px\" \/><\/p>\n<p>Now run the following command from an Exchange Online session.<\/p>\n<pre>Get-MailUser -Identity <UserName> | fl displayname,ExchangeGuid<\/pre>\n<p>As you can see in my example the Exchange GUID\u2019s are in fact different.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-569\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/4.png\" alt=\"\" width=\"637\" height=\"89\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/4.png 637w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/4-600x84.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2017\/10\/4-300x42.png 300w\" sizes=\"(max-width: 637px) 100vw, 637px\" \/><\/p>\n<p>From the Exchange Online session use the following command to manually set the GUID to match the on-prem one.<\/p>\n<pre>Set-MailUser -Identity user@domain.com\u00a0-ExchangeGUID xxxxxxxxx-xxxxxxxxxxxxxxxxxxxx<\/pre>\n<p>Once this command completes you can use the Get-MailUser command again to check if the changes have been written to Azure AD.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a project I was running some time ago, one of the main Tasks was to move on-premise Mailboxes to Exchange online. The migration went more or less smooth, but there was one mailbox which I wasn\u2019t able to migrate. By checking the migration status with Powershell: Get-MigrationUser -BatchId | Get-MigrationUserStatistics I got the following [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[1923,2,3],"tags":[],"class_list":["post-564","post","type-post","status-publish","format-standard","hentry","category-microsoft-365","category-exchange","category-powershell"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/564","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=564"}],"version-history":[{"count":7,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/564\/revisions"}],"predecessor-version":[{"id":5206,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/564\/revisions\/5206"}],"wp:attachment":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=564"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=564"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=564"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}