Connect to Business Central version 16 or later
This article details the steps involved to connect Jet Analytics to the following data sources:
Business Central Version 16 or Later (Online Tenant)
-
Business Central (Online Tenant) via OAuth
Recommended Cloud Connection
The Jet Data Manager can connect to Business Central via Online Tenant using a locally stored OAuth token to authenticate the connection.
Business Central Version 16 or Later (On Premise)
-
Business Central (On-Premise) via Web Service Connection
This is the most effective method of connecting to an on-premise instance of Business Central. This connection method will pick up ENUM's and automatically consolidate aggregation tables.
-
Business Central (On-Premise) via Direct SQL Connection
This method is the fastest for On-Premise connections but comes with drawbacks. The Direct SQL Connection will not pick up ENUM's and will not consolidate aggregation tables. If the performance of a connection via Web-Services is not viable, customizations can be made in your project to achieve the same results.
Note: When managing Business Central data via a direct SQL connection, the Jet extension fields will be distributed into each individual data table instead of a separate table.
Business Central (Online Tenant)
-
Gather tenant and environment information:
-
From the Business Central portal navigate to Help and Support.
-
Locate your Tenant ID and Environment name.
-
-
Obtain web services access key:
The web services key has been deprecated by Microsoft and will no longer be available for use when it is officially deprecated some time in early 2022. For instructions on utilizing OAuth, click Business Central (Online Tenant) via OAuth .-
From the search icon navigate to Users
-
Select the user which will be used to establish the connection to the Business Central data source.
Note: this user will require a permission set of SUPER and the company column should be blank.
-
Next copy the Web Services Access Key
-
-
Install extension:
-
From within the Business Central portal, using the search icon, navigate to Extension Management.
-
Click Manage > Extension Marketplace.
-
Search for "Jet Analytics" and click Get it now
-
-
Verify extension installation:
-
Click Manage and then Deployment Status
-
Verify that the status column has a value of completed.
-
-
Allow
http
client requests:If you are configuring a production environment, you can skip this step.
-
If you are configuring a sandbox environment, you will need to allow the Jet Analytics extension to send diagnostic information. In the Business Central portal, navigate to Extension ManagementLocate the Jet Analytics extension, and click on the menu next to the extension name (indicated by three vertical dots). Click Configure and toggle on Allow HttpClient Requests.
-
-
Configure Business Central data source in Jet Analytics project:
Open your existing project. In this example, we are using a pre-built cube store project.
-
Right-click on the data source and choose Edit BC 365 provider
-
Input the following:
- API URL
- Environment name
- Authentication type
- Username
- Password
-
Click Test Connection> OK.
The username will be in the same format as the username in the Business Central portal. Do not use the UPN / email address.
The password will be the web services access key.
-
Right-click on the data source and choose Set Up Accounts.
-
Check the box for the desired companies and click OK.
-
Right-click on the data source and choose Synchronize Objects.
You should now be able to see your tables in the Data Selection pane.
Business Central (Online Tenant) via OAuth
-
Gather tenant and environment information:
-
From the Business Central portal go to Help and Support.
-
Locate your Tenant ID and Environment name.
-
From the search icon, go to Users.
-
Select the user which will be used to establish the connection to the Business Central data source.
This user will require a permission set of SUPER, and the company column should be blank.
-
-
Install the Extension:
-
From within the Business Central portal, using the search icon, navigate to Extension Management.
-
SelectManage > Extension Marketplace.
-
Search for "Jet Analytics" and select Get it now.
-
-
Verify the extension installation:
-
Select Manage > Deployment Status.
-
Verify that the status column has a value of completed.
-
-
Allow http client requests:
If you are configuring a Production environment you can skip this step.
-
If you are configuring a Sandbox environment, you will need to allow the Jet Analytics extension to send diagnostic information. In the Business Central portal, navigate to Extension ManagementLocate the Jet Analytics extension, and click the menu next to the extension name (indicated by three vertical dots). Click Configure and toggle on Allow HttpClient Requests
-
-
Configure Business Central data source in Jet Analytics project:
Open your existing project. In this example, we are using a pre-build cube store project.
-
Right-click the data source and select Edit BC 365 provider.
-
Enter the following:
- API URL
- Environment: If your environment is not named as 'Sandbox' or 'Production', enter the environment name.
- Authentication: Indicates the authentication type used for your Business Central.
-
To authenticate with OAuth, you need to specify a path in which to create a token on your local machine. The path can be anywhere on the local machine and can have any name as long as it ends in ".txt".
After entering the token path, click Authorize OAuth and the token will automatically be created in the specified path after entering your Business Central login credentials.
-
Once done click Test Connection > OK.
The username will be in the same format as the username in the Business Central portal. Do not use the UPN / email address.
-
Next, right-click the data source and choose Set Up Accounts.
-
Check the box for the desired companies and click OK.
-
Next, right-click the data source and choose Synchronize Objects.
You should now be able to see your tables in the Data Selection pane.
Business Central (Online Tenant) via Service to Service
In the Jet Data Manager Wizard Setup, select BC 365.
In the Name field, enter the name of the data source.
-
In the API URL, enter https://api.businesscentral.dynamics.com/v2.0/{tenantId}. Replace {tenantId} with the actual Azure AD tenant ID. To get the Azure AD tenant ID, go to Business Central, select ? and Help & Support, and enter the environment that can be found in the same location.
Install "Jet Analytics" from the Extensions Marketplace in BC and enable the setting "Allow HttpClient Request". For more information on enabling the Allow HttpClient Request setting, see Business Central (Online Tenant).
If using OAuth 2.0 authentication, select OAuth 2.0 in the Authentication dropdown and enter a legitimate file path (e.g. C:\oauth\oauth.txt) for the locally stored OAuth token to authenticate the connection. The text file does not have to be created beforehand, as TimeXtender will create it once you authorize OAuth.
Ensure that the user that will be authorizing the connection has D365 AUTOMATION or SUPER access in BC. To do this, go to the relevant environment in Business Central, click the search box in the upper right corner, search for users, and click users. Select the relevant user, and add either SUPER permission set (with blank company name) under User Permission Sets, or D365 Automation.
Click authorize OAuth, and enter the user credentials with D365 AUTOMATION or SUPER access in BC.
If authenticating using Service to Service Authentication then select Service to Service option in the Authentication dropdown.
-
To register an Microsoft Entra ID application for authentication to BC, follow Task 1 in Using Service to Service Authentication - Business Central, and under “API permissions” select “Add a permission”, and add the application permissions.
-
To set up the Microsoft Entra application in Business Central, follow Task 2 in Using Service to Service Authentication - Business Central.
In the TimeXtender BC 365 Provider window, enter the client ID, which is the application (client) ID for your app registration in Azure used earlier. Also enter the client secret, which is the value under “Certificates & Secrets” in your app registration in Azure. Click OK.
Business Central (On-Premise) via Direct SQL Connection
As of 1/15/2021 the direct SQL Connection does not support ENUM objects. If you need these ENUM objects you should use the Business Central (On-Premise via Web Service Connection).
-
Right-click the data source and choose "Edit Microsoft SQL Provider".
-
Enter the server name where the BC database resides and select the database in the drop-down list.
-
Right- click the data source and select Set up accounts.
-
Select the box to indicate which company data sets to pull into the project. In this example, we want to pull data for both CRONUS USA and CRONUS EXT USA.
-
Right click the data source and choose "Synchronize Objects".
Business Central (On-Premise) via Web Service Connection
Select the
.app
file that corresponds with your version of Business Central from the download location.-
Publish the application.
Run the following cmdlet in the Business Central Administration Shell:
Publish-NAVApp -ServerInstance [ServerInstance] -Path [PathToAppFile] -SkipVerification Publish-NAVApp -ServerInstance 'MicrosoftDynamicsNavServer$BC160' -Path 'C:\JetAnalyticsCloudConnector\JetAnalyticsCloudConnector\insightsoftware_Jet Analytics_1.0.0.20.app' -SkipVerification
-
Synchronize.
Run the following cmdlet in the Business Central Administration Shell:
Sync-NAVApp -ServerInstance [ServerInstance] -Name [AppName] -Version [AppVersion] -Tenant [TenantName] Sync-NAVApp -ServerInstance 'MicrosoftDynamicsNavServer$BC160' -Name 'Jet Analytics' -Version 1.0.0.20 -Tenant default
-
Step 4: Install app
Run the following cmdlet in the Business Central Administration Shell:
Install-NAVApp -ServerInstance [ServerInstance ] -Name [AppName] -Tenant [TenantName] Install-NAVApp -ServerInstance 'MicrosoftDynamicsNavServer$BC160' -Name 'Jet Analytics' -Tenant default
This codeunit will appear in your Web Services
-
Configure Business Central data source in Jet Analytics project:
Open your existing project. In this example, we are using a pre-built cube store project.
Right-click Data Sources and selectAdd Dynamics Business Central (NAV) Adapter.
Select Wizard Setup.
Select BC 365.
Give your data source a name and select OK.
-
Enter the following:
-
OData API URL
- The OData API URL should not have a trailing forward slash
-
Example URLs:
-
https://11.192.123.45:7048
/BC190
-
https://businesscentral.company.com:7048/Production
-
(
https://BCURL:ODATAport/BCInstance
)
-
(
-
- If SSL is not enabled, use http rather than https
-
Environment
- The environment name should be empty.
-
Authentication
- Authentication type depends on your environment.
-
OData API URL
After entering the required details, select Test Connection > OK.
Right-click the data source and select Set Up Accounts.
Select the box for the desired companies and select OK
Right-click the data source and select Synchronize Objects.
You can now see your tables in the Data Selection pane.