OAuth Parameters

Discuss RoboTask here
OldGeek
Posts: 34
Joined: Thu Jun 01, 2023 2:50 pm
Location: Upstate NY

OAuth Parameters

Post 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?
Windows 11 Pro, RoboTask v10.0.2
Oleg
Site Admin
Posts: 3086
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: OAuth Parameters

Post 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.
Oleg Yershov
OldGeek
Posts: 34
Joined: Thu Jun 01, 2023 2:50 pm
Location: Upstate NY

Re: OAuth Parameters

Post 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
Windows 11 Pro, RoboTask v10.0.2
OldGeek
Posts: 34
Joined: Thu Jun 01, 2023 2:50 pm
Location: Upstate NY

Re: OAuth Parameters

Post 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
Outlook365.jpg (114.96 KiB) Viewed 3406 times
Here is the gmail.com
gmail.jpg
gmail.jpg (97.65 KiB) Viewed 3406 times
Windows 11 Pro, RoboTask v10.0.2
Oleg
Site Admin
Posts: 3086
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: OAuth Parameters

Post 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
How to add application
MS-OAuth.png (126.06 KiB) Viewed 3262 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
Permissions
MS-OAuth-permissions.png (94.85 KiB) Viewed 3262 times
Oleg Yershov
Oleg
Site Admin
Posts: 3086
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: OAuth Parameters

Post 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
Google-oauth1.png (11.11 KiB) Viewed 3244 times

Enable GMAIL API for account
Google-oauth2.png
Google-oauth2.png (47.61 KiB) Viewed 3244 times

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

Then go to Desktop client settings and add client secret if necessary
Google-oauth4.png
Google-oauth4.png (68.58 KiB) Viewed 3244 times
Oleg Yershov
OldGeek
Posts: 34
Joined: Thu Jun 01, 2023 2:50 pm
Location: Upstate NY

Re: OAuth Parameters

Post by OldGeek »

When I click on the link you posted above I get this
2024-08-19_08-32-20.jpg
2024-08-19_08-32-20.jpg (135.85 KiB) Viewed 3206 times
2024-08-19_08-36-40.jpg
2024-08-19_08-36-40.jpg (190.82 KiB) Viewed 3202 times
Windows 11 Pro, RoboTask v10.0.2
Oleg
Site Admin
Posts: 3086
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: OAuth Parameters

Post by Oleg »

Click on +New registration and register new desktop application to get your client ID
NewApp.png
NewApp.png (8.75 KiB) Viewed 3195 times

By default the list of applications is empty.
Oleg Yershov
OldGeek
Posts: 34
Joined: Thu Jun 01, 2023 2:50 pm
Location: Upstate NY

Re: OAuth Parameters

Post by OldGeek »

2024-08-19_09-01-33.jpg
2024-08-19_09-01-33.jpg (151.52 KiB) Viewed 3194 times
Windows 11 Pro, RoboTask v10.0.2
Oleg
Site Admin
Posts: 3086
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: OAuth Parameters

Post 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
Oleg Yershov
Post Reply