Connecting to Microsoft Dynamics 365 Business Central via SQL
You can use SQL to connect to Microsoft Dynamics 365 Business Central in the Data Virtuality Studio or the Code Editor in the Web UI.
Pre-requisites
You need the Client Id, ClientSecret, ServerName, TenantGuid.
How to Connect
Run the following statements in the Data Virtuality Studio or the Web UI (remember to enter your credentials):
CALL SYSADMIN.createConnection (
name => 'dynamics_bc_src'
,jbossCLITemplateName => 'ws'
,connectionOrResourceAdapterProperties => 'EndPoint=https://api.businesscentral.dynamics.com/v2.0/{ServerName},ClientId=<ClientId>,ClientSecret=<ClientSecret>,AccessTokenEndpoint=https://login.microsoftonline.com/{TenantGuid}/oauth2/v2.0/token'
);;
CALL SYSADMIN.createDataSource (
name => 'dynamics_bc_src'
,translator => 'dynamics_bc'
,modelProperties => 'ExcludeCompanyNames=<ExcludeCompanyNames>,CompanyNames=<CompanyNames>,SkipInitOnStart=false,PageSize=100'
,translatorProperties => ''
);;