Set Up the Windows Desktop Client for Oauth (SaaS)

Set Up the Windows Desktop Client for Oauth (SaaS)

You are here:

The Windows Desktop Client Configuration for Oauth (SaaS) page details the steps needed to set up the Windows Desktop Client for Oauth (SaaS). Before you can begin setting up the Windows Desktop Client for OAuth (SaaS), you must complete the following steps:

  1. Create a new Web Service record called “WMDM” in Business Central.
  2. Obtain a valid license from support.
  3. Navigate to the Web Services page in Business Central.
  4. Select +New and input information in the following fields:
    1. Object Type: codeunit
    2. Object ID: 23044900
    3. Service Name
  5. Check Published.
  6. Copy the SOAP URL for your service record in Business Central, if needed.

For more information on published Web Service, see Microsoft’s Publish a Web Service page.

Configure Windows Desktop

  1. Get the Warehouse Insight Desktop Client installer and the web service installer; copy these to an accessible location on your local machine.
  2. Enable IIS features.
  3. Turn on and install IIS features:
Internet Information Services
+ FTP Server
Web Management Tools
IIS 6 Management Compatibility
IIS 6 Scripting Tools
IIS 6 WMI Compatibility
IIS Metabase and IIS 6 configuration compatibility
IIS Management Console
IIS Management Scripts and Tools
IIS Management Service
World Wide Web
Application Development Features
.NET Extensibility 3.5
.NET Extensibility 4.8
Application Initialization
ASP .NET 3.5
ASP .NET 4.8
ISAPI Extensions
ISAPI Filters
Server-Side Includes
WebSocket Protocol
  1. Stop the IIS Server.
  2. Run the Web Service Installer previously copied (creates files; go here to see these files).
  3. Replace the WHILicense.txt file with the valid license file obtained from Support.
  4. Modify the Web.config file in \WebServiceInstall (See the Web.config file table below):
    1. Match the partial key to the new one (provided by whomever generated a license).
    2. Match Company name and Environment name (under ServiceURL).
    3. Locate the Client ID, Client Secret, and Tenant ID in the Azure Active Directory Applications (how to acquire these values here).
    4. Set Authentication Mode (oAuth) to “5”.
    5. Set Client Credential Type to “None”.
  5. Start the IIS server.
  6. Open the Warehouse Insight desktop client as administrator.
  7. Select Options (Configuration window opens on the System tab).
  8. Change your configuration code, web service, and company name to match your environment (change Web Service IP address to yours):
    • Configuration Code: Device configuration code from Warehouse Insight in Business Central.
    • Company Name: Company being used in Business Central.
    • Web Service: WebServiceInstall Application URL in IIS and ‘/EventManager.asmx’ (e.g. http://localhost/WebServiceInstall/EventManager.asmx).
  1. Enter AAD Login under the Logins tab (used for this client going forward).
  2. Check Always Maximize under the Device tab (maximizes the device screen).
  3. Check Connect BS via IIS and uncheck Enable Rebex Libraries under the Network tab.
  4. Close and save settings.
  5. Select Remember Me on the Login screen, enter your credentials, and select Login.

Web.config File Table

You web.config file changes will look something like this:

Authentication Mode <setting name=”AuthenticationMode” serializeAs=”String”>



Service URL <setting name=”ServiceURL” serializeAs=”String”>

<value> XXXXX-%-encoded-company-name-XXXXXXX /Codeunit/WMDM</value>


<setting name=”AuthorizationEndpoint” serializeAs=”String”>

<value>{0}/oauth2/v2.0/token </value>


Client ID <setting name=”ClientID” serializeAs=”String”>

<value> XXXXx-retrieve-from-azure-XXXXX<value>


Client Secret <setting name=”ClientSecret” serializeAs=”String”>

<value>XXXXXXXXXXX-keep-this-value-secret-XXXXXXXXX</value> </setting>

Tenant ID <setting name=”TenantID” serializeAs=”String”>





Partial key

<setting name=”PartialKey” serializeAs=”String”>



ClientCredentialType maxBytesPerRead=”2147483647″ maxNameTableCharCount=”2147483647″/>

<security mode=”Transport”>

<transport clientCredentialType=”None” realm=””/>





Authentication or grant issues

If you receive authentication or grant issues, you need the tenant administrator with sufficient permission to open the Azure Active Directory Applications page after they log into Business Central.

  1. Navigate to Azure Active Directory Applications in Business Central.
  2. Select New.
  3. Copy and paste your client ID to the Client ID field and select Grant Consent (ensure popups are enabled).
  4. Log in with a valid account.
  5. Select Accept to accept the permission request.

When you select Accept and the tenant administrator selects Accept, “Consent was given successfully” message appears.

Check errors

  • If the login errors, check the IIS log. You can find the log under the Windows desktop client installation folder.
  • Use Warehouse Insight Desktop Client in lieu of an emulator, as the scanner connects to Business Central in the same way as the Desktop Client (via IIS).
Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Need help?

Leave A Comment

Go to Top