0365 HTTP - Office 365 Authentication w/ GET - Dynamics 365 Business Central
This node was written specifically to pull data from a BC endpoint into GlobalCapture. It uses service to service oAuth login flow described here. Before attempting to use this node, be sure to follow the steps outlined for configuring auth.
Setup
You will need the Tenant ID, Client ID, and Client Secret to authenticate and make requests. It’s highly recommended you test your configuration outside of a Capture flow by following the instructions here.
Note that the Client Secret is the VALUE, not the ID. You must have the Client Secret Value, and if you do not, you will need to request a new client secret be made. It can not be retrieved after the fact.
Authorization URL
At the time of publishing, the correct oAuth 2 endpoint is:
https://login.microsoftonline.com/YOURTENANTIDHERE/oauth2/v2.0/token
Do not forget to use the correct Tenant ID.Client ID
The raw client ID value.Client Secret
The raw client secret value.Scope
For Business Central, the default scope should be:
https://api.businesscentral.dynamics.com/.defaulto365 Endpoint
The full path, including any filtering parameters to execute an HTTP GET against. Endpoints for the various BC objects can be found here.
BC supports “custom” endpoints. Integrators may develop non-standard routes to present or join specific data elements. If the customer is using non-standard routes, the integrator will need to be involved to secure the routes properly and ensure they are published to the correct deployment (production, sandbox, etc).
Execution
When this node runs, it will authenticate, and then perform a GET on the o365 endpoint specified. Results returned are expected to come back in a JSON object with an Array named “value”. The node will attempt to map process fields to elements at array index 0. For example, if the response includes a field named “vendorName”, it will automatically assign that value to a like named Process Field. If there are multiple matches, they will all be assigned.
The request body, which should always be expressed as JSON, is written to the Capture Processing folder for the process. A separate file will be written for each request. Requests are written to files in the form:
request_xyz.json
Where xyz represents a timestamp (Epoch Time). If needed, convert the timestamp using:
https://www.epochconverter.com/
Date | Version | Description |
---|---|---|
11/21/2022 | 1.0 | Initial node release. |
01/20/2023 | 1.1 | Fixes an error with logging connection |
01/29/2024 | 1.4 | Ensure request body parsing for dates only operates on fields with the word DATE in the key’s name. |
TBD | 1.5 | Output request body to file. |