none
Migration from IMAP to Office365: BAD User is authenticated but not connected RRS feed

  • Question

  • Trying to migrate old IMAP account to new Office365 account using imapsync:

    imapsync --authmech1 PLAIN --authmech2 PLAIN --authuser1 "migration@domain.tld"  --host1 "oldmail.server" --host2 "outlook.office365.com" --user1 "account_to_be_migrated@domain.tld" --user2 "migration@domain.tld\ID@domain.tld" --password1 "REDACTED" --password2 "REDACTED" --office2

    where:

    - migration@domain.tld admin user in both domains (in Office365 Mailbox_Import permission is granted)
    - ID@domain.tld login credentials for Office365

    and imapsync's logs:

    Host2: connecting and login on host2 [outlook.office365.com] port [993] with user [migration@domain.tld\ID@domain.tld]
    Host2 IP address: 40.101.19.146
    Host2 banner: * OK The Microsoft Exchange IMAP4 service is ready. [QQBNADQAUABSADAAMgAwADIAQwBBADAAMAAyADAALgBlAHUAcgBwAHIAZAAwADIALgBwAHIAbwBkAC4AbwB1AHQAbABvAG8AawAuAGMAbwBt
    AA==]
    Host2 capability before authentication: IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS MOVE ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+
    Host2: outlook.office365.com says it has CAPABILITY for AUTHENTICATE PLAIN
    Host2 failure: Error login on [outlook.office365.com] with user [migration@domain.tld\ID@domain.tld] auth [PLAIN]: 2 NO AUTHENTICATE failed.
    Host2 info: trying LOGIN Auth mechanism on [outlook.office365.com] with user [migration@domain.tld\ID@domain.tld]
    Host2: success login on [outlook.office365.com] with user [migration@domain.tld\ID@domain.tld] auth [PLAIN]
    Host2: state Authenticated

    ... and later ...

    Read:   5 BAD User is authenticated but not connected.


    Sunday, September 8, 2019 5:40 AM

Answers

  • Solution:

    • proper CLI arguments for imapsync are: --authuser2 "office365_admin@domain.tld" --user2 "user_to_be_migrated@domain.tld" --office2
    • before that following PS command must be executed Add-MailboxPermission -identity user_to_be_migrated@domain.tld  -user office365_admin@domain.tld -accessrights fullaccess -inheritancetype all

    • Marked as answer by marianh Thursday, September 12, 2019 5:27 AM
    Thursday, September 12, 2019 5:27 AM

All replies