Connect Bichon to Microsoft Exchange Accounts

31. Juli 2026 Aus Von Ralph Kokott

This has been taking me hours due to Microsoft Entra being changed over the years. Unfortunately the documentation is not that detailed as I would need it. Please use https://lostdomain.org/2025/12/24/backing-up-the-cloud-email. Also be aware that the Microsoft Graph API is – and I cannot stress this enough – the wrong one (see here https://github.com/rustmailer/bichon/issues/53). That mistake had my log fill up with „code: ImapAuthenticationFailed“. For sync with Google some Redditor was kind enough to make a guide with as many screenshots as I would have needed (see here https://www.reddit.com/r/selfhosted/comments/1pfa2rv/how_to_backup_your_gmail_account_with_bichon/).

Regarding my specific issue: As of now Bichon uses the API „Office 365 Exchange Online“, specifically the permission „IMAP.AccessAsUser.All“. Across the internet I found older documentation that was specifically aimed to allow IMAP access as some part of „legacy“ Exchange right. However, it just was not listed for me.

For anyone looking for that GUID to add in the manifest please use the following ID:

The Claude tip that might work – should that change or really be tenant specific is to run the following in Powershell:
Connect-MgGraph -Scopes „Application.Read.All“ Get-MgServicePrincipal -Filter „appId eq ‚00000002-0000-0ff1-ce00-000000000000′“ | Select -ExpandProperty Oauth2PermissionScopes | Where-Object { $_.Value -like „*IMAP*“ }

Back to our Oauth2 Config: Bison has a default setting for Outlook. To make it work with Exchange I also had to remove that specific key:

Other than that, one can rely on tutorials such as: https://lostdomain.org/2025/12/24/backing-up-the-cloud-email

Because I had been looking left and right: To authorise the access your browser will open a popup that may be blocked, so be aware:

Since this is mostly for documentation, I will just sum this up as a free and very convenient solution to email archiving that does not rely on an exchange server. Also note that the Bichon data files will need a regular backup (3-2-1 rule considered) and be aware of legal challenges in bulk archiving your mails (e.g. mandatory deletion of applicants). Cheers.