O365 Oauth Inbound Connection

I have the outbound Office 365 email working. I just can’t get the inbound working. Keep getting wrong user or password when trying to connect. I followed the Oauth connection procedure in the documentation and all that seems to go fine. I get an access token, but when trying to connect with an inbound account I get incorrect password or login when trying to select folders.

Does anyone have this working and can offer some tips on how they got it working? I’d just like to know that some people have actually got it working.

Hi Paul, This thing drove me nuts the past 24 hours. Service had been working for the past 2 years, then all of a sudden stopped. I think it was because the SSL certificates were rekeyed on the site and then updated, but not sure.

I kept on recreating the azure piece following the docs and found this conflict.

In the docs it says to use the IMAP . AccessAsUser . All to connect.

That didn’t work. So I used the microsoft endpoint from azure
https graph . microsoft . com / IMAP . AccessAsUser . All

That didn’t work either.

Turns out you HAVE to use https:// outlook . office . com / IMAP . AccessAsUser . All which is counterintuitive, as the address I used to connect to create the inbound email connection was [ outlook . office365 . com]

The second piece of the puzzle for me was how to create a group account so that I could go in an authenticate for all of my 80+ users. For that I created a service account crm_email@domain.com, and then when requesting the bearer token, made sure to use that account to get the token as a Group account - had to force a logout from my working domain account in Microsoft to get that to work.

Then in the Microsoft tenant, I added the service account user to the individual email with full delegate authority to read,write, function as owner, etc.

Now when users need their email, they can just go and select it. There is probably a more elegant way to do this, but as it’s working again. I don’t want to touch this house of cards. This is with SuiteCRM v7.14 - I haven’t messed with this on 8, but thought I would put this here. Thanks for all of the help!

2 Likes