Hi list, Marton,

this is mainly for the archive to report back after more than a year
that yes, oama is able to handle multiple accounts by the mechanism
Marton described, and can, after configuration, be called as
        oama access [email protected]
        oama access [email protected]

Thanks again,
P

* Marton Balazs <[email protected]> [2025-12-28 17:38]:
> Hi Peter,
> 
> I only have one account and I use oama instead of oauth2ms, but anything I do 
> like
> 
> oama access <email>
> oama authorize microsoft <email>
> 
> always has the email address in and all files in
> ~/.local/state/oama and
> ~/.local/var/oama
> 
> are named after my email address.
> 
> While I haven't checked, this suggests that oama might be prepared to handle 
> multiple email addresses. You might want to give it a try.
> 
> Best wishes,
> Marton
> 
> 
> On Sun, Dec 28, 2025 at 04:38:21PM +0100, Peter P. wrote:
> > Hi list,
> > 
> > I am successfully using oauth2ms to authenticate mbsync to one
> > outlook365 account. Now I need to access up to three different
> > outlook365 accounts but can't figure out how to...
> > 
> > So far I followed the instructions from
> > https://people.maths.bris.ac.uk/~mb13434/linux_m_uob/o365_imap_smtp.html
> > 
> > I thereby installed the libsasl2-dev package, cloned and compiled
> > https://github.com/moriyoshi/cyrus-sasl-xoauth2.git
> > 
> > Cloned the https://github.com/harishkrupo/oauth2ms.git script and
> > installed its dependecies python3-xdg python3-msal python3-gnupg and had
> > to create the file ~/.config/oauth2ms/config.json including TENANT_ID
> > and CLIENT_ID with values provided by my local o365 admins:
> > {
> >     "tenant_id": "TENANT_ID",
> >     "client_id": "CLIENT_ID",
> >     "client_secret": "CLIENT_SECRET",
> >     "redirect_host": "localhost",
> >     "redirect_port": "5000",
> >     "redirect_path": "/getToken/",
> >     "scopes": ["https://outlook.office.com/IMAP.AccessAsUser.All";, 
> > "https://outlook.office.com/SMTP.Send";]
> > }
> > 
> > Then I ran oauth2ms and it opened a browser through which I logged in
> > and oauth2ms received a token in return, which got stored as
> > ~/.local/share/oauth2ms/credentials.bin
> > 
> > I see no way to specify multiple accounts in
> > ~/.config/oauth2ms/config.json nor can I see that
> > ~/.local/share/oauth2ms/credentials.bin will handle more than one
> > account. And the TODOs on
> > https://github.com/harishkrupo/oauth2ms?tab=readme-ov-file#todos
> > mention that there is no support for multiple accounts (yet).
> > 
> > Is there anyone here using mbsync (and msmtp) with multiple o365 accounts? 
> > How are
> > you approaching it?
> > 
> > Thanks for all ideas and help!
> > Peter
> > 
> > 
> > _______________________________________________
> > isync-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/isync-devel


_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to