Create a connection file in Excel to store all information that is needed to ensure a connection to SharePoint, D365 FSCM, D365 BC, D365 CE | Dataverse, SAP or any other environments that require an external authentication.
The advantage of such a connection file is that you can manage your connection data centrally and use it across data sources.
Steps
Creating the connection file
Create a new Excel file named Connection.xlsx in your document template folder.

Connection file in Test folder
If you want to connect to a system that is not using Entra ID authentication, set up the connection with the following columns:
URL: e.g., SAP URL or D365 on-prem URL
Username: This should be a service user
Password: password (we recommend encrypting it via Crypto Data Source)
Important
Username and Password have been deprecated for D365 and SharePoint online connections.
If you need to connect to your D365 systems or SharePoint Online, please enter the information from your Entra ID App Registration.
For more information see Using a Microsoft Excel config file for the Add-In’s Microsoft Entra ID configuration.
Optional: Create any other columns that are needed to ensure a connection to your system.
Save the file.
Adding the connection file to a data map
To enable your data map to access the contents of the connection file, you must link the file to the data map via an Excel data source.
In Microsoft Word, Excel or PowerPoint, go to the dox42 ribbon and select Data Map.

dox42 ribbon in Microsoft Word
The Data Map Designer window opens.

Data Map Designer window
Select the Excel data source.
The Excel window opens.
Excel window
On the Data Source tab, select Pick Excel file to choose the file you have just created.
In the File text field, dynamise the path of the connection file by using the
<%DocPath%>variable.
Example:<%DocPath%>..\Connection.xlsx
Excel window with configuration
Note
The
..\tells the system to look a level above in the folder structure and there it will find an Excel file named Connection.xlsx. Using<%DocPath%>makes it possible to copy the data map and insert it to another template folder without the need of changing the path.Go to the Data Source Output tab.
Select the First Row of selected Range contains Column Names checkbox.

Data Source Output tab in Excel window
Select the … button to select the fields from the Excel file.
The Excel file opens.Mark the area with all the data.
It is sufficient to only mark the header row.
Excel file with marked data
Close the Excel file.
The data that has been marked will be taken over in the Data Range field.Select the Read until first empty cell checkbox for one of the fields.
By selecting this checkbox, you make sure that all data rows are included, even if your Excel data source contains various rows. It is important to select the checkbox for a field that contains values in every row, e.g., an ID field.
Excel window
Select the OK button.
A new Excel data source has been added.Select Save.
Result
You have created a connection file and connected your data map to it.