I need to migrate our mail service from office365 to a local mail server. In the past I did use imapsync to do mail migration but with office and it's ouath2 authentication mecanism I am stuck.
I have mainly two big problems, how to automate the token request process (I am using mutt_oauth2 to get the token) since it asks for both the gpg pass-phrase and it needs the copy paste of the url into a browser to get the token. Is there a way to make this process automatic/scriptable?
The second problem, I have no knowledge about office365 nor Azure. Is there a way to configure a sort of service account to access all outlook accounts, to avoid changing all accounts passwords? This will greatly simplify the first problem since I only have to deal with the token of one account (to sync the other accounts) rather than the tokens of hundred of accounts.
Regards.