While trying to configure the mails during OAuth Configuration if you get the following error in the logs
2. Select Office 365 or Exchange Server as per your setup.
3. Select Service Account Access and perform Test. Use the credentials you have used in your mail server settings.
When all the above mentioned are passed try the below solutions.
Some Solutions:
-> In some cases issue was fixed by changing the proper details as below,
Make sure the Scope is properly entered in the Mail server settings (Admin-Mail Server Settings). You need to provide the below mentioned URL.