Dynamics 365 Business Central - Basic Auth

Dynamics 365 Business Central Basic Authentication

Basic Authentication is deprecated feature. Use OAuth authentication instead

Overview

Dynamics Mobile portal must configured to communicate with Dynamics 365 Business Central. The communication with Dynamics 365 Business Central requires Dynamics Mobile portal to authenticate properly and one of the authentication methods is called Basic Authentication.

Dynamics Mobile supports Basic Authentication which is the preferred authentication method with Dynamics 365 Business Central as of now and this requires certain configurations to be made on the Dynamics 365 Business Central and Dynamics Mobile sides.

Prerequisites

  • Dynamics 365 Business Central instance with the following:

    • Activated ODATAv4 service for each, entity which needs to be consumed via Livelink

    • ODATAv4 interface visible via internet from Dynamics Mobile Cloud

    • Dedicated user account with full access to Dynamics 365 Business Central (e.g. username and password) to be used as a service account from the Dynamics Mobile Cloud

    • Generated WebService Key for the dedicated user account in Dynamics 365 Business Central

    • Dynamics Mobile extension to be able to execute outbound https requests to Dynamics Mobile Cloud ( *.dynamicsmobile.com)

Configuring Dynamics 365 Business Central

  1. Go to your Dynamics 365 Business Central and create dedicated user for the Dynamics Mobile Cloud and generate WebService Key

2. Copy the Web Service Access Key

Application Area Configuration

Dynamics Mobile application area also needs certain configurations to be made to be able to connect to Dynamics 365 Business Central.

The configuration for BC includes 2 main sections:

  • Sync configuration - controls the way the mobile applications consume data from BC for off-line mode ( VAN Sales, Surveys, Smart Trade)

  • Live Link configuration - controls the way the mobile applications consume data from BC in real-time (VAN Sales, Warehouse & Inventory, Approvals)

A mobile or backend applications, needs to have the following two settings to be provided:

- syncMethod this settings contains parameters used by the apps to read and write business data from/to Dynamics 365 Business Central consumed in offline mode - e.g. temporarily stored in the app and used without internet - liveLink_[AppName] this setting contains parameters used by the apps to read and write business data from/to Dynamics 365 Business in real time - e.g. when needed.

Both of the settings have the same list of parameters and are configured in the Settings section of the user's role.

Parameter name

Values

Notes

type

d365bc

Must have value d365bc

authType

ntlm or oauth

The type of authentication during authentication sessions to BC.

Use oauth when connecting with Dynamics 365 Business Central Cloud

servicePath

string

The path portion of the URL used to connect to BC. Use the following path when connecting with Dynamics 365 Business Central Cloud:

/v2.0/DM/api/DynamicsMobile/DMDAO/v1.0

host

string

The name of the host (internet name) of the instance. Use the following path when connecting with Dynamics 365 Business Central Cloud:

api.businesscentral.dynamics.com

port

number

the TCP port where the BC service is published Use the following path when connecting with Dynamics 365 Business Central Cloud:

443

protocol

http or https

The protocol used to communicate with the instance. Use the following path when connecting with Dynamics 365 Business Central Cloud: https.

clientId

The user name from Dynamics 365 Business Central

clientSecret

The Web Service Access Key from Dynamics 365 Business Central

Example

The example contains sample settings for offline apps (syncMethod) and real-time connectivity called in this case liveLinkService_SLA. The actual name of the livelinkService (e.g. the portion _SLA) depends on the mobile or backend applications used in the application area -e.g. it means that this setting will be used by the SLA app.

{
  "language": "en",
  ....
  "syncMethod": {
    "type":"d365bc",
    "authType":"basic",
    "servicePath":"/v2.0/DM/api/DynamicsMobile/DMDAO/v1.0",
    "host":"api.businesscentral.dynamics.com",
    "port":"443",
    "protocol":"https",
    "clientId":"DM",
    "clintSecret":"abc-ASD-as12-1-12311231231"
    
  },
  "liveLinkService_SLA": {
    "type":"d365bc",
    "authType":"basic",
    "servicePath":"/v2.0/DM/api/DynamicsMobile/DMDAO/v1.0",
    "host":"api.businesscentral.dynamics.com",
    "port":"443",
    "protocol":"https",    
    "clientId":"DM",
    "clintSecret":"abc-ASD-as12-1-12311231231"    
  }
 ...
}

Last updated

Dynamics Mobile provided by Mobile Affairs Ltd. | 1712 Sofia, Bulgaria, Alexander Malinov 51 | sales@dynamicsmobile.com