DataMigrate Pro·Getting started
settings.json reference (DataMigrate Pro)
The settings.json reference explains every field of the file in DataMigrate Pro, how it is used at runtime, the defaults and when to use each option.
This document explains every field in settings.json, how the app uses it at runtime, defaults, and when to use each option. It’s based on the code in DataMigratePro.Core (notably DataConnectionManager, DataConnectionSettings, DataHandler, and related classes).
Where the file lives and how it’s used
- Location: The app loads and saves
settings.jsonfrom the executable directory (same folder asDataMigratePro.exe). It does not use the repository root during runtime. - Load: At startup of each invocation,
DataConnectionManager.LoadDataConnectionSettings()readssettings.jsonand populates internal static values. - Save: When you pass certain CLI flags (e.g.,
--sqlconnection,-w,--tenantid/--clientid/--clientsecret), the app persists the updated values back tosettings.jsonusingSaveDataConnectionSettingsAsync(). - Token cache: The OAuth access token for SaaS is persisted to
token.jsonin the same executable folder with:AccessToken(string)TokenExpiresAt(UTC DateTime)
Quick start examples
Minimal SaaS example:
{
"SqlConnectionString": "Data Source=SERVER;Initial Catalog=SOURCE_DB;Integrated Security=SSPI;",
"SourceCompany": "CRONUS AG",
"DestinationCompany": "MyCompany",
"SourceDatabase": "SOURCE_DB",
"MappingDatabase": "SOURCE_DB",
"MigrationDatabase": "MigrationDB",
"Environment": "Sandbox",
"TenantInfo": {
"TenantId": "<AAD_TENANT_GUID>",
"ClientId": "<APP_REG_CLIENT_ID>",
"ClientSecret": "<APP_REG_CLIENT_SECRET>"
},
"EndpointUrl": "https://api.businesscentral.dynamics.com/v2.0/<TENANT_GUID>/Sandbox/ODataV4/Upload_LoadData?company=MyCompany",
"BlobMagicSignature": [2, 69, 125, 91],
"IsSaaS": true,
"EnableServiceBus": false
}Minimal on‑prem example:
{
"SqlConnectionString": "Data Source=SERVER;Initial Catalog=SOURCE_DB;Integrated Security=SSPI;",
"SourceCompany": "CRONUS AG",
"DestinationCompany": "MyCompany",
"SourceDatabase": "SOURCE_DB",
"MappingDatabase": "SOURCE_DB",
"MigrationDatabase": "MigrationDB",
"EndpointUrl": "http://bc-server:7048/BC/ODataV4/Upload_LoadData?company=MyCompany",
"BlobMagicSignature": [2, 69, 125, 91],
"IsSaaS": false,
"BCUser": "DOMAIN\\User",
"BCPassword": "<password>",
"EnableServiceBus": false
}Note: For listener mode (Service Bus), see the ServiceBus section below.
Field-by-field reference
The JSON object adheres to DataConnectionSettings. Property names are case-insensitive when loading.
SQL and databases
- SqlConnectionString (string)
- Purpose: Primary SQL Server connection string used throughout the app (e.g., mapping initializer, exports, queries).
- On every start-up (CLI commands,
-t listen, MCP server profile activation) the app creates the databases named inMappingDatabaseandMigrationDatabasewhen they do not exist yet (both inherit the collation ofSourceDatabase), and ensures the mapping tables inside the mapping database. The login therefore needsCREATE DATABASEpermission on a fresh server; if creation fails, the error is logged and the start continues.
- SqlConnectionStringMigration (string, obsolete)
- This field is accepted only for backward compatibility and is no longer written by the app. Migration database access uses
SqlConnectionStringplusMigrationDatabase.
- This field is accepted only for backward compatibility and is no longer written by the app. Migration database access uses
- SourceDatabase (string)
- Name of the source NAV/BC database (used by SQL builders and mapping initializer).
- MappingDatabase (string)
- Name of the database that hosts DataMigrate Pro’s mapping tables. Required for mapping operations; created automatically on start-up when missing.
- MigrationDatabase (string)
- Name of the auxiliary migration database used in helper procedures (e.g., generating transfer tables, schema cache, listener activity). Created automatically on start-up when missing.
- SqlCommandTimeout (int, seconds; 0 = unlimited)
- Applies to SQL commands via
SqlCommand.CommandTimeoutin various operations.
- Applies to SQL commands via
Business Central endpoint and companies
- EndpointUrl (string)
- Base OData endpoint for data upload:
.../ODataV4/Upload_LoadData?company=<Company>. - The app derives two related endpoints by replacing
_LoadDatawith:_LogMessagefor logging_CommitTransactionfor commit/finish
- The company name at the end of the URL is also parsed and stored internally.
- Base OData endpoint for data upload:
- SourceCompany (string)
- Logical source company (used in SQL and mapping placeholder replacements, e.g.,
{SourceCompany}or{Company}).
- Logical source company (used in SQL and mapping placeholder replacements, e.g.,
- DestinationCompany (string)
- Target BC company (used in placeholder replacements
{DestinationCompany}).
- Target BC company (used in placeholder replacements
- Environment (string)
- Business Central Online environment name, for example
SandboxorProduction. The editor requires it only whenIsSaaS = true.
- Business Central Online environment name, for example
Placeholders in mapping expressions: The app replaces {Company} and {SourceCompany} with SourceCompany, and {DestinationCompany} with DestinationCompany inside certain mapping expressions and SQL fragments.
Authentication and runtime mode
IsSaaS selects the object numbering, BCAuth selects how requests to Business Central authenticate:
"IsSaaS": true, // numbering: true = AppSource IDs, false = on-premise IDs
"BCAuth": "Credentials", // optional: "OAuth" | "Credentials"; absent = derived from IsSaaS
"BCUser": "admin", // Credentials only; DOMAIN\User supported; empty = default (Windows) credentials
"BCPassword": "..." // DPAPI-protected on first saveIsSaaS |
BCAuth |
Auth | Numbering | Endpoint auto-regeneration |
|---|---|---|---|---|
| true | absent / OAuth |
Bearer via TenantInfo |
AppSource | yes |
| true | Credentials |
BCUser/BCPassword or default credentials |
AppSource | no |
| false | absent / Credentials |
BCUser/BCPassword or default credentials |
on-premise | no |
| false | OAuth |
Bearer via TenantInfo |
on-premise | yes |
- IsSaaS (bool)
- Object numbering only:
trueuses the SaaS/AppSource object IDs;falsederivesOnPrem = trueandNewNumbering = trueinternally and uses the on-premise object range.OnPremandNewNumberingare no longer written tosettings.json.
- Object numbering only:
- BCAuth (string, optional)
OAuth: Azure AD OAuth (Bearer) usingTenantInfo.Credentials:BCUser/BCPasswordasNetworkCredential(supportsDOMAIN\\User), or default credentials whenBCUseris empty.- Absent:
IsSaaS = true→OAuth,IsSaaS = false→Credentials. Values are case-insensitive; any other value is rejected with an error whensettings.jsonis loaded. - Endpoint auto-regeneration: with
OAuth,EndpointUrlis rebuilt fromTenantInfo.TenantId,EnvironmentandDestinationCompanywhen all three are set. WithCredentials,EndpointUrlis used as configured (e.g. a BC container or on-premise server withIsSaaS = true). - Written to
settings.jsononly when set.
- TenantInfo (object)
- TenantId (string, GUID)
- ClientId (string)
- ClientSecret (string)
- Used to fetch and cache OAuth tokens from Azure AD. Tokens are stored in
token.jsonand reused until ~5 minutes before expiration.
- BCUser (string) and BCPassword (string)
- Only relevant when
BCAuthresolves toCredentials. If provided, the app uses these credentials for HTTP requests. If omitted, default/network credentials may be used by the underlying HTTP handler depending on environment configuration.
- Only relevant when
- DemoTarget (bool, default
false)- Set by the demo mode (
DataMigratePro --demoor Demo setup… in the configuration editor). Whentrue, the Business Central target is the managed demo sandbox:TenantInfo,Environment,IsSaaS = true,BCAuth = OAuthandEndpointUrlare applied in memory on every load from the compiled-in vendor identity and are removed from the file on every save (together withBCUser/BCPassword). OnlyDestinationCompany(the demo company) and the SQL settings are persisted. - The configuration editor hides the tenant, endpoint and authentication fields while
DemoTargetistrueand shows a read-only Demo target row instead. Switching Use demo target off clears the managed fields so your own tenant can be entered. - The compiled-in demo registration key is only accepted while
DemoTargetistrue. - Written to
settings.jsononly whentrue. Seedocs/DataMigratePro-Demo-Mode.md.
- Set by the demo mode (
Timeouts
SQL command timeout (SqlCommandTimeout)
- Type: integer seconds; 0 disables the limit.
- Where applied: Assigned to
SqlCommand.CommandTimeoutacross SQL operations (e.g., query execution, configuration changes). - How to set: Either directly in
settings.jsonor via CLI--sqlcommandtimeout <seconds>; persisted tosettings.json.
Bulk copy timeout
SqlBulkCopy.BulkCopyTimeoutis set to0(no limit) in code and is not configurable viasettings.json.
Service Bus and service lifecycle
- The Service Bus receiver uses short polling intervals (e.g.,
ReceiveMessageAsync(TimeSpan.FromSeconds(1))). These are internal and not configurable viasettings.json. - The Windows Service shutdown waits up to ~30 seconds for tasks to complete; this is not configurable via
settings.json.
- The Service Bus receiver uses short polling intervals (e.g.,
Mapping editor: target structure change check
- TargetStructureCheckIntervalMinutes (int, minutes, default
5;0disables the check)- Purpose: While the mapping editor (
--editmode) is open, it downloads the Business Central structure viagetstructureevery N minutes in the background, computes a fingerprint over the normalized BC Table/BC Field records and compares it with the fingerprint stored at the last full structure refresh ([DMP BC Structure State]in the mapping database). - Behavior: When the structure differs, a hint with remote/local table and field counts and a Reload BC structure now link appears in the navigation panel above the Propagation Log tile; the link runs Mapping functions › Refresh BC structure. Checks are skipped while an editor action is running; connectivity problems are logged locally and never hide an existing hint.
- Baseline: After a partial update of BC Table/BC Field (for example Build single mapping from BC structure or the standard-API/legacy download) the stored fingerprint is marked unknown and the next check records the current remote structure as the new baseline without a hint.
- Serialization: Always written to
settings.jsonso an explicit0survives a save from the Configuration editor.
- Purpose: While the mapping editor (
Transfer behavior
- ForceSequentialPutDataChunks (bool, default
false)- Purpose: Forces sequential putdata chunk sending for all tables by setting effective chunk parallelism to
1. - Scope: Applies to both
putdataandputalldatatransfer paths. - Precedence: Overrides CLI
--parallel/-parallelvalues. - Identity tables: Identity/autoincrement tables remain sequential regardless of this setting.
- Purpose: Forces sequential putdata chunk sending for all tables by setting effective chunk parallelism to
Binary data and BLOB handling
- BlobMagicSignature (byte[])
- A small magic byte signature expected at the start of serialized BLOB payloads. Default if not provided:
2, 69, 125, 91. - Used by
NAVBlobReaderand in data upload paths to recognize BLOB payload framing.
- A small magic byte signature expected at the start of serialized BLOB payloads. Default if not provided:
Integration: Azure Service Bus (listener mode)
- EnableServiceBus (bool)
- Set to
trueonly when this installation should run listener mode (-t listen) or listener-backed file-service, printer, and remote PowerShell processing. - When
false, the MappingEditor does not require Service Bus values and hides the queue, file-service, and PowerShell settings. - Printer discovery and listener startup are rejected when this flag is
false.
- Set to
- ServiceBus (object)
- ServiceBusConnectionString (string)
- RequestQueueName (string)
- ResponseQueueName (string)
- connectionId (string)
- Usage: Required only when
EnableServiceBus = trueand the listener-backed features are activated. - Validation:
ServiceBusSettings.Validate()throws informative errors if any required property is missing.
Listener behavior is implemented in ServiceBusListener. Registration flows can also populate these Service Bus values automatically after a successful registration handshake.
Integration: McpRelay (remote MCP access through the listener)
- McpRelay (object, optional; requires
EnableServiceBus = true)- Enabled (bool, default
false) – answermcp.*commands from the DataMigrate Pro MCP gateway in Azure; without it every such command is answered withMcp.Disabled. - ReplyQueueName (string, default
mcp-replies) – session-enabled queue in the same namespace; the listener's SAS policy needs Send on it. - AllowWrite, AllowMigration, AllowSourceProfiling, AllowSourceQuery (bool, default
false) – same meaning as the--allow-*switches ofDMP.McpServer, enforced on this machine. - AllowGatewayApproval (bool, default
false) – accept approvals the human confirmed through the AI client (mcp.approve); otherwise write tools need the token file in<DataDirectory>\approvals. - SyncWaitSeconds (int, 0–20, default 3), MaxJobs (int, 1–32, default 4), JobRetentionSeconds (int, 60–86400, default 1800), ReplyTtlSeconds (int, 30–3600, default 300).
- DataDirectory (string, optional) – jobs, approvals, audit log and output files of the in-process MCP server (default
%LOCALAPPDATA%\DataMigratePro\mcp\relay). - AllowedPaths (string[], optional) – additional directories the MCP file tools may read/write.
- Validation:
McpRelaySettings.Validate()runs when the first relay command arrives andEnabledis true. Details: MCP-Remote-Access.md.
- Enabled (bool, default
Integration: serviceSchedule (service-scheduled execution)
- serviceSchedule (object)
- CommandArguments (string)
- StartDate (DateTime, optional, example:
2026-07-01) - EndDate (DateTime, optional, example:
2026-12-31) - RecurringType (string, required when using the scheduler; supported values:
Interval,Once) - RecurringInterval (TimeSpan, required for interval-based runs, example:
01:00:00) - StartingTime (TimeSpan, optional, example:
18:00:00) - EndingTime (TimeSpan, optional, example:
06:00:00) - Days (string, optional, comma-separated day tokens such as
Mo,Tu,We,Sa,Su) - Usage: When present, the launcher can host a Windows service that executes the configured DataMigrate Pro command on a timer inside the defined date, day, and time window.
- Overnight windows are supported. If
StartingTimeis later thanEndingTime, the allowed window is treated as crossing midnight.
Example:
{
"ServiceSchedule": {
"CommandArguments": "-t putalldata --tablegroup \"1,2,3,4,5\" --changesonly 1",
"StartDate": "2026-07-01",
"EndDate": "2026-12-31",
"RecurringType": "Interval",
"RecurringInterval": "01:00:00",
"StartingTime": "18:00:00",
"EndingTime": "06:00:00",
"Days": "Mo,Tu,We,Sa,Su"
}
}AppSource and on-prem compatibility
- AppSourceEnabled is always treated as enabled internally and is no longer written to
settings.json. OnPremandNewNumberingare derived fromIsSaaSand are no longer written tosettings.json.
Reconciliation (-t reconcile, OData mode only)
Optional section Reconciliation with the published OData page web service names (GlEntriesService, CustomerLedgerEntriesService, VendorLedgerEntriesService, DetailedCustomerLedgerEntriesService, DetailedVendorLedgerEntriesService, VatEntriesService for the vatbalance report, ItemLedgerEntriesService for inventoryqty, ValueEntriesService for inventoryvalue) and the open-item tuning values OpenItemFilterBatchSize (default 50) and OpenItemFullScanThreshold (default 2000). Only used when the Business Central side is read via --target odata (or the auto fallback). Field-by-field description: DataMigratePro-Reconciliation-Dokumentation.md.
LedgerCutoff (cutover decision file)
Optional section LedgerCutoff with CutoverSettingsPath: path of the cutover decision file cutover-settings.json (relative paths are resolved against the folder of settings.json; default cutover-settings.json next to settings.json). The file holds the department decisions for the ledger/inventory/fixed-asset cutoff (template: cutover-settings.example.json, description of every setting: DataMigratePro-LedgerCutoff-Handbuch.md). --cutoversettings <path> overrides the path, --setting section.key=value[;...] overrides single values for one run; -t ledgercutoffsettings --validate|--show|--export|--example manages the file.
How CLI flags map to settings.json
When you pass any of the following flags, the app loads current settings, applies your updates, and persists back to settings.json in the executable folder.
- --sqlconnection → SqlConnectionString
- --sqlconnectionmigration → accepted for compatibility, but no longer persisted
- --tenantid/--clientid/--clientsecret → TenantInfo
- -w → EndpointUrl (also updates derived commit/log endpoints and internal company name)
- --sourcecompany → SourceCompany
- --sourcedatabase → SourceDatabase
- --sqlcommandtimeout → SqlCommandTimeout
- --blobmagicsignature "2, 69, 125, 91" → BlobMagicSignature (comma-separated list of bytes)
Run-only overrides (never persisted)
The following flags override the corresponding settings.json values for the current process only. They are never written to settings.json, and a run that persists other flags (for example --sqlcommandtimeout) still writes the original file values for these fields.
- --environment → overrides
Environment - --destinationcompany → overrides
DestinationCompany - --mappingdatabase → overrides
MappingDatabase - --migrationdatabase → overrides
MigrationDatabase
Effect on the Business Central endpoint when --environment and/or --destinationcompany are given:
BCAuth = OAuth(SaaS) with aTenantInfo.TenantId: the canonical endpointhttps://api.businesscentral.dynamics.com/v2.0/{TenantId}/{Environment}/ODataV4/Upload_LoadData?company={DestinationCompany}is built from the effective values.- Otherwise (on-prem /
BCAuth = Credentials): the configuredEndpointUrlis rewritten —--environmentreplaces the path segment directly beforeODataV4(the server instance, e.g.BC230),--destinationcompanyreplaces thecompany=query value. Other query parameters are kept. Example:https://host:7048/BC230/ODataV4/Upload_LoadData?company=CRONUSwith--environment BC240 --destinationcompany "CRONUS AG"becomeshttps://host:7048/BC240/ODataV4/Upload_LoadData?company=CRONUS%20AG. - If the configured URL has no
ODataV4segment, a warning is logged and the URL stays unchanged.
The log, commit and file-system-commit endpoints are derived from the effective endpoint. The overrides survive internal settings reloads during the run, and a --mappingdatabase/--migrationdatabase override also re-targets the schema cache. The mapping editor, listener and scheduled service use the overrides process-wide when started with these flags; they are not applied per received listener command.
Notes:
IsSaaS,BCAuth,BCUser,BCPassword,EnableServiceBus, andServiceBusare not set by CLI flags; configure these directly insettings.json(or via registration for Service Bus values).ServiceScheduleis also configured directly insettings.jsonand is consumed by the service-scheduled execution mode.- On start, if both
SqlConnectionStringandMappingDatabase(persisted or overridden) are present, the app tries to initialize the mapping database tables automatically.
Security notes
ClientSecret,BCPassword, andServiceBusConnectionStringare sensitive. They are stored in plain text withinsettings.json. Restrict file access appropriately.token.jsonstores a valid OAuth access token and its expiry. Treat it as sensitive and avoid committing it to source control.
Troubleshooting tips
- No settings.json found: You can create it manually (using the examples above) or run the app once with connection CLI flags to have it written.
- SQL mapping init fails: Ensure the SQL Server is reachable and the user has rights to create tables in
MappingDatabase. - SaaS auth issues: Check
TenantInfovalues, ensure the AAD app has the correct permissions for Business Central, and thatBCAuthresolves toOAuth(BCAuth = "OAuth", or absent withIsSaaS = true). - On-prem auth issues: Verify
EndpointUrlpoints to your server,BCAuthresolves toCredentials(BCAuth = "Credentials", or absent withIsSaaS = false), andBCUser/BCPasswordare correct (include domain when needed). - Listener mode errors: Set
EnableServiceBus = trueand make sure allServiceBusproperties are valid; the app validates and will report which value is missing.