Datarails Integrations solution is a plan that lets you consolidate all your data sources and seamlessly connect your external apps to the Datarails web app. For more information contact our integrations team here.
What you need to get started:
-
Admin user rights as well as passwords for both:
- Your Microsoft Azure Console
- Your dedicated MD 365 account for Datarails synchronizations (or another account with relevant permissions)
- Your Datarails account
- Know which data table you want to sync with Datarails
Step 1: Create an Application on Azure Console
- Sign into Microsoft Azure Console as an admin.
- Search for Azure Active Directory, under Services click on Microsoft Entra ID.
- Under Manage panel on the left, click on App Registration.
- Click on New Registration.
- A new screen opens. In the Name field write "Datarails App".
- For Supported account types, leave as default or the one that fits your needs.
- For Redirect URI, select the platform Web, and insert the following url: https://businesscentral.dynamics.com/OAuthLanding.htm
- Click on the Register button.
Copy Information
- Navigate to Overview on the left panel.
- Please copy and save the following information:
- Application (client) ID
- Client Secret - This is the Value we saved from Step 2.5
- Directory (Tenant) ID
Step 2: Create a client secret and give permission for this App
Create a Client Secret
- Navigate to Certificates & secrets on the left panel.
- Click New Client Secret
- In the Expires dropdown, choose the relevant time, preferably the longest time.
- Click the Add button.
- Copy the Value, and save it in a note for later. Note if we navigate away the Value will disappear. Make sure you are copying Value and NOT Secret ID.
Give permissions for the app
- Navigate to API Permissions on the left panel.
- Click Add a permission.
- Under Select an API, choose Dynamics 365 Business Central.
- Choose Application permissions, check off all relevant permissions. Best practice is to check all the permissions. Note that Datarails is a READ ONLY application.
- Click the Add permissions button.
- After adding permissions, please choose Grant admin consent.
Step 3: Get the MD 365 Web Service URL
- Login to Microsoft Dynamics BC as an Admin user.
- Navigate to the search icon and enter "Web Services". Click Web services, a long list of web services will show.
- Click any page (it doesn't matter which one), and when the page opens, click the link in the
column ODataV4. When the page opens, copy the url up to and including OData V4 and
save it for later. (Ex. http://api.clientcompany.dynamics.com/v2.0/376282bc-2tef-5ca-b1fb45632/LiveProd/ODataV4/)
Step 4: Give the app access to your Business Central account
- Navigate to the search icon and enter "Microsoft Entra ID" and click Microsoft Entra Application.
- Click on New to add the new application.
- Fill out the fields as follows:
- Client ID: Paste the Application (client) ID you copied previously
- Description: "Datarails APP"
- State: Choose Enabled
- Under User Groups, choose D365 BUS FULL ACCESS code. To be able to pull from all company entities you need the column Company Name to be blank, if you wish to give access to certain companies you will need to give permissions for each company.
- Under User Permission Sets section choose the following permissions:
- D365 BUS FULL ACCESS
- SUPER (DATA)
- Choose Grant Consent. You will be prompted to enter your Microsoft credentials. Once it is confirmed you will get a pop-up saying Consent was given successfully.
To setup the Datarails connection please have the following values that we saved in previous steps:
- Application (client) ID
- Client Secret - the Value we saved from Step 2.5
- Service URL (ODataV4)
- Directory (tenant) ID
Step 5: Create a New Data Source in Datarails
With the MD 365 setup complete, the Datarails-side of the synchronization can begin. You will be using values saved in the previous steps.
- From the left panel,, select Admin > Data Sources.
- From the top right of the screen, click the + icon. The Add Data Source dialog box appears.
- Complete the dialog box:
- Organization: Your company
- Type: Microsoft Dynamics -Oauth 2.0
- Sync User: Your Datarails sync user
- Name: Give the integration a name
- Service URL: The Service URL (ODataV4) Note: up to ....../ODataV4/
- Client ID: Applicatio (client) ID
- Client Secret: Client secret
- Tenant ID: Directory (tenant) ID
- Click Save.
- Click Test. If you see "OK" in the Test Results box, you are ready to continue
- Click Close.
Step 6: Create a New Filebox
On the Datarails main page.
- Navigate to Workspace > Main via the panel on the left.
- Click New + on the right and select New Filebox.
- In Create a new Filebox, only the following are mandatory:
- Name - Give the Filebox a name, for this example please use the name "Company Names"
- Date Tag - Toggle on and choose month
- Click Create & Close to be taken back to your workspace.
Step 7: Query for Company Names
Navigate to find the Company Names Filebox you just created
- Scroll down to the Data Connection section
- From the drop down on the right choose the data source "MicrosoftDynamics365Financials - Microsoft Dynamics"
- Find Object Types - Object to query and in the empty white box on the right side find the query "Company"
- Leave all the other settings as is. Next to Save data integration click Save
- Above this next to Sync now click Sync Now
- Navigate to the Versions tab
- Hover over the 3 dots on the right side and click Preview version
- The preview will open in a new tab. From the list of names in the first column, choose which company name you want to work with and save it for later.
- This Filebox will forever contain the query that holds all of the company names. You can refer back to them at any time.
Step 8: Synchronize the Data
This example is for a General Ledger using the query "general_ledger_entries_excel". Other queries will have different syntax.
- Create a new Filebox
- From Workspace, select the Filebox you just created and click the Settings tab
- Scroll down to the Data Connection section
- Complete these fields:
- Data Connection Type: "MicrosoftDynamics365Financials - Microsoft Dynamics"
- Object Types - Object to query: From the dropdown, select one of the tables available.
-
Sync Query - Query for sync: Insert the following query, replacing COMPANYNAME with the company name you selected from the last step:
- company=COMPANYNAME&$filter=Posting_Date ge {{date_tag|somonth}} and
Posting_Date le {{date_tag|eomonth}}
- company=COMPANYNAME&$filter=Posting_Date ge {{date_tag|somonth}} and
-
Click Save.
-
If the settings are accepted, you will see the message "Query Saved" at the bottom of the screen.
-
-
Click Sync Now.
-
If the settings are accepted, in the top right of the screen you will see the message "Command Sync Now sent successfully," as shown below:
-
-
When all the settings are accepted, you're ready to move to the next step.
Step 8: Review and Verify the Synchronization
- From the Versions tab, you can see the file that was imported.
- To verify that the data is correct, click the 3 dots ⋮ icon and select Preview Version.
-
Verify that the data is as expected. Here's an example.
You're all set!
© Datarails Ltd. All rights reserved.
Updated
Comments
0 comments
Article is closed for comments.