SuiteCRM8 inbound email account OAuth fails

Is there an issue on GitHub for this?

If it is so reproducible it shouldn’t be too hard to fix…

Next time I have the occasion to do it, I’ll confirm if that’s still an issue. It’s been a couple of months since I did it and I just have in big bold letters in my notes not to test the connection. I seem to remember if you press that, it doesn’t connect and times out. However, if you just select the folders and then save, it all works and you’re good.

I’m back after some time leaving this problem with a good news : today, I went back to the CRM and strong of the last comment from PGR (Pstevens wrote “Main point, DONT TEST THE CONNECTION”), I have tried again… and get this working !!!

I want to apologize for my last messages, I was disappointed, discourraged and lost alone with a problem wihout exit and was very sad.

I know we are on a forum and every one have a life, dont have to be here for all the “small users”, but without all this small message and tips given here, I wouldnt be able to succeed.

So, thanks to all of you for your time, your patience and your understanding :slight_smile:

With many others posts found on the forum and the net, I have been able also to understand some strange behavior (the SSL/TLS dropdown still showing “no” after saving but saving effectively in the database for example).

Thanks again to all of you, especially Pstevens and Pgr :slight_smile:


Thanks @Chabi02 glad it worked for you. Maybe you could return the favor (to me and the community) by letting us know if the SuiteCRM documentation about the Azure side of things works as is, or you had to do anything different. That would be super helpful, as I don’t have Azure personally so I only have the experience on the SuiteCRM side of things.

Hi :slight_smile:
I prepare a full doc and post it when ready !

Thanks again for all :slight_smile:

It looks like there was a PR released with 7.14.1 that supposedly fixes this “test connection” hangs and fails. Also, this commit also supposed to help test connection. Are these fixes also in 8.4?

Hi everybody,
So to help anyone else who need this, here is all what I did to get Oauth2 working on SuiteCRM8.

First, here is all what I have done on Azure to get this working on my side.

My screenshot are in french, but you will be able to find out the most important part in english views.

On Image1 : you have all the things done : name of the app, id of the app, id of the object, id in the directory, certificates, Redirect URL, URI id of the app. That’s a summary.

On Image2 : you have all the end points listed.

On Image3 : I have the certificate with the secret ID.

On Image4 : I have set the redirect URL

On Image5 : you can see how I have set the rules for feeds

On image7 : this is a very important part, the scopes used. Check here the 4th column (with “Non” for “no” and “Oui” for “Yes”), this is the column for “admin consent”.

With all this set, I have follow the doc and set only a group address (to allow me to have the automatic import for emails).

All this have been working with in this order :

  • Set the External OAuth Connector - Type : personnal
    Name : Microsoft
    Perimeter, 4 lines (in this exact order) :
- offline_access
- User.Read
- User.Read.All

set here also the id of the app, the authorize token (from Azure), the url to the token (from Azure)
Set also additionnal config :

  • Get Token request grant type : authorization_code

  • Refresh token request grant type : refresh_token

  • Set the External OAuth Connection :
    Type : personnal
    name : full email
    Token : Bearer
    Choose the External Oauth Connector
    → Identify to retrieve the 2 keys to allow connection.

Carefull here : I had to identify one time as admin (check the beginning of this list for Azure)

  • Set incoming emails with OAuth
    Type : group
    Smtp server :
    SSL - Port 993
    Set also the Oauth connector.

When all is set, then DONT TEST THE CONNNEXION, just broswe the folder and they raise.
Then save and you are ok.

The outgoing email account is easier to set up (, classic set up.

Tell me if this is ok with all these elements :slight_smile:

1 Like

Hi pstevens,
Not to open another can of worms, but would you be able to help with connecting OAuth with gmail too?
I’ve tried all the instructions and documentation, but when clicking the test connection button (before i read this post) i just get a blank white screen.

Self hosted
SuiteCRM 8.5.1

Never click the test connection button. If you click on folders and get folders, you are connected. In my experience the button does not work.

@pstevens it used to work.

Is there an Issue on Github for this?

Hi :slight_smile:
The tip for “not click the test connection button” have saved my life and my time before !


Hey @pgr there are a whole bunch of issues around test connection. Not sure which ones are specifically an issue with “test connection” which should otherwise work, or the issues are a symptom of other problems. For me (on many installs), I can get the folders from IMAP which means it works. There is no need to test connection. However, test connection causes timeout and white screen. Just haven’t had a chance to get to the bottom of this one.

The other big pain with the new email setup is in previous versions you had to press a button to change the password. In current version all you have to do is populate the field. This is an issue because it’s so easy for your browser to populate a password in the field from password manager and you hit save after editing your signature or something and then your email stops working. For users this is a huge problem because they don’t know to check that their email password is not autopopulated by their browser and causes tons of support issues.

The new email set up screens solved a lot of problems, and set the foundation for a more reliable email set up in the future - email is complex and there are so many thing that can go wrong… setting up passwords shouldn’t be one of them.

We need to fix whatever problems are left until it "just works :tm: "!

1 Like

@pgr and everyone, I’ve re-tested the inbound email setup. Looks like the “test connection” setting is fixed in 7.14.3 that I tested with, but there are still issues:

  1. The SSL selection does not save. This one has been around for a while. Well actually it saves the first time, but then if you go back in to edit it’s unchecked and then fails test connection (until you check SSL off again). Each time you save the inbound email it is necessary to re-check SSL before testing and/or saving.

  2. More of a usability, but Chrom often inputs passwords in the password field and it’s super easy to re-save with that populated with the wrong password and mess up your email connection. It was better in previous versions where you had to click on a button to change the password. This prevented this problem.

Other than those two items. Everything else seems to work for me.