Set up Microsoft Entra ID authentication

Set up Microsoft Entra ID authentication

Overview

This guide describes how to set up Microsoft Entra ID authentication for Mobile WMS.

This guide covers:

  • Creating and configuring an app registration in the Microsoft Entra admin center

  • Collecting the required IDs and SOAP URL

  • Configuring the Business Central Service Tier (On-Premises only)

  • Configuring the Mobile WMS endpoint

An app registration establishes a trust relationship between Mobile WMS and the Microsoft identity platform, enabling the app to securely authenticate users and interact with Business Central through Microsoft's identity and access management. Without it, users cannot sign in to Mobile WMS using their Microsoft Entra ID organizational accounts.

Version requirements for Entra ID authentication

For Business Central Online:

  • Mobile WMS Android app 1.5.0 or later

For On-Premises installations:

  • Mobile WMS BC extension 5.18 or later

  • Mobile WMS Android app 1.6.0.1 or later

Do you need an app registration?

For Business Central Online: An app registration is always required.

For On-Premises installations: An app registration is only required when the Business Central Server instance that Mobile WMS connects to is configured with credential type AccessControlService.
You do not need an app registration if the server instance uses one of the following credential types: UserName, NavUserPassword or Windows.

Manual or automatic setup?

For Business Central Online:

  • MOB5.67 or later: Start from Tasklet Setup Center in Business Central and use the Set up an App Registration guide, which can automatically create the app registration in the tenant's Entra ID, covering all BC environments in that tenant (Sandbox and Production).

  • Before MOB5.67: Use the Mobile WMS Sandbox Configuration Guide for automatic app registration creation. The guide must be run in a sandbox environment, but the app registration covers both Sandbox and Production.

Use this manual guide instead if you prefer manual setup or if automatic setup is not available.

For On-Premises installations: The app registration must always be created manually using this guide.

Step 1 – Create a new app registration

  1. Go to https://entra.microsoft.com and sign in.

Note: Sign in to Microsoft Entra admin Center with a user account that belongs to the same Entra ID tenant as your Business Central environment, and that has permission to register applications.

  1. In the left-hand navigation, expand Entra ID and select App registrations.

  2. Click New registration.

MS Entra Admin Center 1 - New registration.png
  1. Enter a name for the registration, e.g. Mobile WMS.

  2. Under Supported account types, select:

    • Single tenant only - <your tenant>

  3. Under Redirect URI, select Public client/native (mobile & desktop) from the platform dropdown and enter:

    https://businesscentral.dynamics.com/
  4. Click Register.

MS Entra Admin Center 2 - Register an application.png
  1. The application's Overview page is displayed.
    Here you see the Application (client) ID, which uniquely identifies your application.

 

Step 2 – Add API Permissions

  1. In the left menu of the app registration, select API permissions.

  2. Click Add a permission.

MS Entra Admin Center 3 - Add a permission.png
  1. In the panel that opens, select APIs my organization uses and search for Dynamics 365 Business Central, then select it.

MS Entra Admin Center 4 - API Permissions - Select BC.png
  1. Select Delegated permissions.

  2. Check user_impersonation.

  3. Click Add permissions.

MS Entra Admin Center 5 - API Permissions - Add permission.png
  1. Click Grant admin consent for [your organization] and confirm.

MS Entra Admin Center 7 - API Permissions - Grant consent.png

 

Step 3 – Collect the required values

You need three values to configure Mobile WMS: the Application (client) ID and Directory (tenant) ID from the app registration, and the SOAP URL from Business Central.

Client ID and Tenant ID

  1. In the left menu of the app registration, click Overview.

  2. Copy and save:

    • Application (client) ID

    • Directory (tenant) ID

MS Entra Admin Center 6 - Client ID and Tenant ID.png

SOAP URL

  1. Log into Business Central in the environment that Mobile WMS should connect to.

  2. Switch to the company that Mobile WMS should connect to.

  3. Go to the Web Services page.

  4. Find the entry for MOB WS Dispatcher.

  5. Copy the SOAP URL field.

BC - SOAP url.png

Note: The SOAP URL contains the Tenant ID — if it does not match the Directory (tenant) ID from your app registration, the app registration has been created in the wrong Entra ID tenant.

https://api.businesscentral.dynamics.com/v2.0/[TenantId]/[EnvironmentName]/WS/[CompanyName]/Codeunit/MobileDocumentService

 

 

Step 4 – Configure the Service Tier (On-Premises only)

This step configures the Business Central server instance to accept Entra ID access tokens from Mobile WMS by setting the ValidAudiences property.

ValidAudiences tells the server instance which access token audiences to accept — setting it to <https://api.businesscentral.dynamics.com> allows Mobile WMS to authenticate using the same standard scopes as Business Central Online, with no custom scopes needed.

BC 21 and later – PowerShell

Open the Business Central Administration Shell as administrator (Start → search Business Central Administration Shell → Run as administrator) and run:

Set-NAVServerConfiguration -ServerInstance <BC server instance name> -KeyName ValidAudiences -KeyValue "https://api.businesscentral.dynamics.com" Restart-NAVServerInstance -ServerInstance <BC server instance name>

Replace <BC server instance name> with the name of your server instance.

Note: The Business Central Administration Shell is a pre-configured PowerShell session that loads the required BC management module automatically. You can also use regular PowerShell (7 or 5) by importing the module first: Import-Module -Name "C:\\Program Files\\Microsoft Dynamics 365 Business Central\\<version>\\Service\\navadmintool.ps1"

Before BC 21 – PowerShell or Server Administration tool

You can either use the PowerShell command above, or configure it via the Server Administration tool:

  1. Open the Business Central Server Administration tool.

  2. Select the server instance used for mobile devices.

  3. Locate the Azure Active Directory (Azure AD) section.

  4. In the Valid Audiences field, enter:

    https://api.businesscentral.dynamics.com
  5. Restart the server instance.

 

Step 5 – Connect the mobile devices to Business Central

How to complete this step depends on whether the devices are managed in MobiControl by Tasklet Factory or by you as a partner.

Managed devices (customers)

Using the values collected in Step 3, send the following to Tasklet Factory via the Service Desk on the project ticket, or raise a new ticket:

  • Application (client) ID

  • Directory (tenant) ID

  • SOAP URL

Partner devices

Update the start.cfg file directly using the template below. Replace the placeholders with the values collected in Step 3.

<endpoints> <endpoint id="01" displayName="D365BC" protocol="classic" type="D365BC" address="[SOAP URL]"> <azureConfiguration authority="https://login.microsoftonline.com/[TenantId]/oauth2/v2.0/authorize" scopes="https://api.businesscentral.dynamics.com/user_impersonation" clientId="[ClientId]" returnUri="https://businesscentral.dynamics.com/"/> </endpoint> </endpoints>

 

 

See also