Share via

Error: UserAlreadyBeingMigratedException

Anonymous
2015-12-14T12:36:35+00:00

Dear,

I initiated a cutover last Friday, no issues then.

Since today, errors on autodiscover - sync not working - at random. Connectivity analyzer OK.

Deleted the mig batch & endpoint. First via portal but that didn't finish (removing state). PowerShell to the rescue:

get-migrationbatch -identity <nameofbatch>

Remove-migrationbatch -identity <nameofbatch> -force

Get-MigrationUser

Get-MigrationUser | Remove-MigrationUser -Force

Remove Migrationendpoint -identity

All completed.

Created a new batch, new name

Error on auto discover (manual override)

Started the batch

Migration now fails with error UserAlreadyBeingMigratedException

Strange as I did Get-MigrationUser | Remove-MigrationUser -Force when cleaning up the initial batch.

The migration is planned for Friday, so I need advise ASAP.

Summary:

Error UserAlreadyBeingMigratedException => HOW TO FIX

Auto discover errors while setting correct via service record => HOW TO FIX

Thanks!!

Microsoft 365 and Office | Subscription, account, billing | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

9 answers

Sort by: Most helpful
  1. Anonymous
    2015-12-15T16:12:06+00:00

    David,

    I'm not sure about the Remove-MigrationUser statement, checked online and get a different view. Did the move request delete. Didn't help. The only thing that helps to fix the user issue now is to delete the account from O365 and run the batch again.

    For the connection issues, it's not a hybrid setup. Doing a cutover. Even so, auto discover set via service record. Works fine for clients even for th remote connectivity checker. But not for O365 as it seems...

    Thanks

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2015-12-15T16:01:04+00:00

    Remove-MigrationUser doesn't remove a user being migrated.  That removes the account that is used to perform the migration (i.e. as was created and associated with the endpoint when it was created).  To remove the actual mailbox migration requests that were created by the migration batch use:

    get-moverequest | remove-moverequest -force

    Also, try running the Hybrid Config Wizard again to recreate your migration endpoint.  I have seen interesting and not all that intuitive errors thrown when the password of the account used for the migration endpoint gets changed or the account is disabled, etc...

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2015-12-15T15:49:46+00:00

    Hey Allen,

    Just tested via connectivity analyzer: OK

    Just tested the connection via powershell:-( - failed.

    -> Very strange as it was working fine from Friday, over the weekend...no changes done.

    Results Test1

    Attempting to resolve the host name remote.groepnba.com in DNS.

      The host name resolved successfully.

    Additional Details

    Testing TCP port 443 on host remote.groepnba.com to ensure it's listening and open.

      The port was opened successfully.

    Additional Details

    Testing the SSL certificate to make sure it's valid.

      The certificate passed all validation requirements.

    Additional Details

    Test Steps

    Checking the IIS configuration for client certificate authentication.

      Client certificate authentication wasn't detected.

    Additional Details

    Attempting to send an Autodiscover POST request to potential Autodiscover URLs.

      The Microsoft Connectivity Analyzer successfully retrieved Autodiscover settings by sending an Autodiscover POST.

    Results Test2

     PS C:\WINDOWS\system32> Test-MigrationServerAvailability -ExchangeOutlookAnywhere -Autodiscover -EmailAddress *** Email address is removed for privacy *** -Credentials $credentials

    RunspaceId         : f81a098d-019a-4c34-bbd7-e1875f53372d

    Result             : Failed

    Message            : The migration service failed to detect the migration endpoint using the Autodiscover service. Consider using the Exchange Remote Connectivity Ana

                         lyzer (testexchangeconnectivity.com) to diagnose the connectivity issues.

    ConnectionSettings : 

    SupportsCutover    : True

    ErrorDetail        : Microsoft.Exchange.WebServices.Data.AutodiscoverLocalException: The Autodiscover service couldn't be located.

                            at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetSettings[TGetSettingsResponseCollection,TSettingName](List`1 identities,

                          List1 settings, Nullable1 requestedVersion, GetSettingsMethod2 getSettingsMethod, Func1 getDomainMethod)

                            at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetUserSettings(List1 smtpAddresses, List1 settings)

                            at Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetSoapUserSettings(String smtpAddress, List`1 requestedSettings)

                            at Microsoft.Exchange.Migration.MigrationAutodiscoverClient.GetUserSettings(ExchangeVersion exchangeVersion, NetworkCredential credential, Str

                         ing emailAddress, Boolean acceptUntrustedCertificates)

    IsValid            : True

    Identity           : 

    ObjectState        : New

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2015-12-15T02:17:00+00:00

    Allen,

    Thanks for your reply.

    I ran the Remove-MigrationBatch and Afterwards Remove-MigrationUser with the idea to Just delete the batch but not the users. Found a case where this was explained. I assumed  the new Mig batch would start syncing the Existing accounts. Aparantely not. I already assumed this was An issue :-) so I deleted a couple of entries (as discribed in your reply) yesterday evening. Afterwards no error. So I Will have to delete all accounts (approx 70) and start over with the Mig.

    Now, this all started because I wanted to "fix" another issue. The migration went fine on Friday, all accounts flippend over no issues. Incremental sync ok. Yesterday I tried the stop/start the batch. Since then errors with certain accounts on auto-discover. I only have 2 domains as primary, Some accounts sync, Some not with the error. Stop/Start again, the same happend with other accounts in the batch. Verified DNS, connection tester, all ok. So tried to fix with the previous.

    I publish the autodiscover via a service record. Cname not An option because cert does not include the name.

    I'll do the above tests later today, keep you posted.

    Mike

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2015-12-14T23:28:28+00:00

    Hi Mike,

    I noticed that you have run the Remove-MigrationBatch command with the Force parameter, but you haven’t removed any migrated user accounts, right? Please be aware that the Remove-MigrationBatch command is only to delete the existing migration batch, while the user accounts which have already been created won’t be deleted along with the batch.

    Therefore, regarding the UserAlreadyBeingMigratedException error, please run the following commands for each account which has already been created during the migration:

    Remove-Msoluser -UserPrincipalName <*** Email address is removed for privacy ***>

    Remove-Msoluser -UserPrincipalName <*** Email address is removed for privacy ***> -RemoveFromRecyclebin –Force

    (you need to use the Microsoft Azure AD Moduleinstead of the Exchange Online PowerShell)

    As to the Autodiscover issue, can you please provide more details, such as which exact error message you have been encountering? I see you have tried the Remote Connectivity Analyzer and the test result is fine. Have you also run the command Test-MigrationServerAvailability to verify the connection? Additionally, you can upload a screenshot of the error by clicking Use rich formatting (under the reply box) -> Insert/Edit Media.

    Thanks,

    Allen

    Was this answer helpful?

    0 comments No comments