This is a step-by-step guide on calling the Microsoft Graph REST API from Axelor Connect:
-
In Axelor Connect dashboard, go to Create a new scenario.
-
Insert the HTTP > Axelor Connect a OAuth 2.0 request module.
-
Open the module's configuration and click Add next to the Connection field to create a new connection.
-
Fill the connection setup as follows:
-
Open the Microsoft Application Registration Portal in a new tab/window and log in with your Microsoft account.
-
Click New registration or select existing MS Azure app.
-
Enter a name (e.g. My Axelor Connect app).
-
Enter in the Redirect URLs field.
-
Click Register.
-
In Properties, copy the Application Id. Switch to Axelor Connect and paste it into the Client ID field.
-
Switch back to the Application Registration Portal.
-
In Certificates & Secrets, click New Client Secret.
-
Copy the generated token Value. Switch to Axelor Connect, and paste it into the Client Secret field.
-
Switch back to the Application Registration Portal.
-
In Overview section click API Permissions OR select API permission section. Click Add a Permission.
-
Select Delegated permissions and enable the required permissions (refer to the Microsoft Graph permissions reference for further details). Start with Offline_access and openid scopes they are required.
Then add additional needed in your integrations for example:
User.Read, Files.ReadWrite.All.
-
Click Add Permissions at the bottom of the page.
-
Switch to Axelor Connect.
-
Add the scopes you added in the previous step into the Scope field.
-
Tick Show advanced settings.
-
Set Scope separator to SPACE.
-
Add additional Authorize parameters as shown below:
-
Add the same scopes space separated to Refresh Token parameters. Create a new scope parameter for it:
-
The connection setup should look like this:
-
Click Continue.
-
A window pops up. Review the permissions and click Accept.
-
The connection is successfully created.
-
You can try to perform a test GET call to https://graph.microsoft.com/v1.0/me.
-
Configure the module to make an API call (see Microsoft Graph REST API v1.0 reference for further details).