Page 1 of 2
OAuth Parameters
Posted: Thu Aug 08, 2024 5:53 pm
by OldGeek
Looking for some help. IMAP Open fails every time. I tried to follow the OAuth instructions for Microsoft but could not get it to work. Has anyone using Microsoft 365 and OAuth?
Re: OAuth Parameters
Posted: Sun Aug 11, 2024 8:22 am
by Oleg
You must complete the OAUTH authorization parameters for your account. You can read more here:
OAuth parameters editor.
You can find all your parameters here (for office365):
https://entra.microsoft.com/
This needs to be done once.
The main goal is to get Refresh Token for authorization. It can only be obtained interactively through MS services.
In addition, Refresh Token has a limited validity period and must be renewed periodically. But it is not difficult to do it after filling in the correct parameters. Literally in two mouse clicks.
Re: OAuth Parameters
Posted: Wed Aug 14, 2024 5:38 pm
by OldGeek
All I get is this error message
Insufficient privileges to complete the operation.
Extension: Microsoft_AAD_l AM
Error code: 403
Resource ID: Not available
Content: EntraDashboard.ReactView
I'm using Win 11 Pro, MS Edge. I'm not sure how to add the image I captured so I copied the text from the image
Re: OAuth Parameters
Posted: Sun Aug 18, 2024 7:41 pm
by OldGeek
Still unable to use OAuth for either gmail.com or outlook356.com
For both I used the OAuth account editor
Here is the outlook365

- Outlook365.jpg (114.96 KiB) Viewed 48484 times
Here is the gmail.com

- gmail.jpg (97.65 KiB) Viewed 48484 times
Re: OAuth Parameters
Posted: Mon Aug 19, 2024 8:41 am
by Oleg
For OAUTH authorization you must prepare your account first
For
office365 account:
go to site
https://entra.microsoft.com/
enter you account parameter (username/email and password)
Next add application to the account. You can add several applications with different permissions.

- How to add application
- MS-OAuth.png (126.06 KiB) Viewed 48340 times
Then go to this application (client ID) settings and add necessary permissions to this client ID. You must have email, POP, IMAP and SMTP permissions for email actions

- Permissions
- MS-OAuth-permissions.png (94.85 KiB) Viewed 48340 times
Re: OAuth Parameters
Posted: Mon Aug 19, 2024 10:23 am
by Oleg
How to prepare
GOOGLE account for OAUTH authorization
go to
https://console.cloud.google.com/
enter you account parameter (username/email and password)
Then go to the
API and Services section

- Google-oauth1.png (11.11 KiB) Viewed 48322 times
Enable GMAIL API for account

- Google-oauth2.png (47.61 KiB) Viewed 48322 times
Go to to
Credential section and add
Desktop client. You can sent any name you want

- Google-oauth3.png (83.47 KiB) Viewed 48322 times
Then go to Desktop client settings and add client secret if necessary

- Google-oauth4.png (68.58 KiB) Viewed 48322 times
Re: OAuth Parameters
Posted: Mon Aug 19, 2024 1:34 pm
by OldGeek
When I click on the link you posted above I get this

- 2024-08-19_08-32-20.jpg (135.85 KiB) Viewed 48284 times

- 2024-08-19_08-36-40.jpg (190.82 KiB) Viewed 48280 times
Re: OAuth Parameters
Posted: Mon Aug 19, 2024 1:48 pm
by Oleg
Click on
+New registration and register new desktop application to get your client ID

- NewApp.png (8.75 KiB) Viewed 48273 times
By default the list of applications is empty.
Re: OAuth Parameters
Posted: Mon Aug 19, 2024 2:03 pm
by OldGeek

- 2024-08-19_09-01-33.jpg (151.52 KiB) Viewed 48272 times
Re: OAuth Parameters
Posted: Tue Aug 20, 2024 8:49 am
by Oleg
Hm-m... It seems MS changed something in its services...
You can join the M365 developer program. It's free. Azure service is paid
When join will be complete just re-login in service and you get the access to necessary functions
I agree, it's somewhat complicated. Google has a more simple and clear setup