Migrate from Microsoft 365 to Another IMAP it's not easy anymore but it can be done [procedures] #435
mshannaq
started this conversation in
Show and tell
Replies: 1 comment 2 replies
-
Since you ended up having to do OAUTH2, I don't understand why you didn't start doing OAUTH2 and only it. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As Imapsync says in docs:
Can I use imapsync to transfer from or to Office365 accounts?
Yes, but it's not easy anymore for new Azure accounts.
So you have to do 3 steps 🥹😅
Today I spent a couple of hours to do it , and finally it works , and I would like to share the procedures that I did:
Read it all before try...
First of all you have to create app password for the account you want to migrate (see https://ae.godaddy.com/help/create-app-passwords-40980)
and to do that you have to make sure you enable multi-factor authentication (see https://ae.godaddy.com/help/enable-or-disable-multi-factor-authentication-32039) and make sute that you enable force multi-factor authentication for the users you want to migrate from (https://account.activedirectory.windowsazure.com/UserManagement/Multifactorverification.aspx#) (need you to sign in with your microsoft 356 account)
then after that return to your account (on https://mysignins.microsoft.com/security-info ) and create app password for microsoft 365 account (and keep the password with you in safe please because it is shown once).
note: you will not see the "App Password" Choice until you activate multi-factor authentication for that user.
after that you can use
imapsync
so it have to be installed on your machine (see https://imapsync.lamiral.info/#install) (on my mac i usebrew install imapsync
)but first you have to generate oauth2 token as described in https://imapsync.lamiral.info/oauth2/oauth2_office365/README.txt by
then run
oauth2_office365_with_imap
ason mac i use:
this will open a browser and ask you to sign in and generate oauth2 token , accept the request to continue.
This will create token file, The tokens will printed on the screen and also generated in the sub-directory "tokens" which has to
exist before contains 2 lines , one for the
access token
and the second forrefresh token
example:
This will try to login on each servers, if everything fine then remove
--justlogin
from the command and run it again to start migrate (sync)Note: when you try to run the command the terminal may ask you for the email password , enter the app password that you create for the email in above steps.
and destination email account should be exists and accessable via IMAP also
(Updates) Note that : For emails that does not has 2fa enabled I notices that I can just create oauth2 token only and sync its contents without need to enforce it to use app password. 😅
Thanks
Resources that help me much more:
Beta Was this translation helpful? Give feedback.
All reactions