Skip to main content

Microsoft Dynamics 365 Finance OAuth 2.0 Client Credentials Guide

Learn How to Connect D365 Finance to Limble Using OAuth 2.0 Client Credentials

This guide explains how to connect the Limble CMMS – Microsoft D365 Finance integration to Dynamics 365 Finance using OAuth 2.0 Client Credentials.

The integration uses this connection type only, not Authorization Code.

For D365 Finance master data, purchasing, and inventory setup after the connection works, read Microsoft Dynamics 365 Finance Setup Guide.


Overview

OAuth 2.0 client credentials is an app-only flow. The integration authenticates as an Azure AD application; D365 Finance treats that app as an integration user when the app is registered inside D365 Finance.

Setup has two parts:

  1. Register an app in Microsoft Entra ID (Azure).

  2. Register that app in D365 Finance and map it to a D365 Finance user.

Then enter the Azure values in the Integration Configuration table under Microsoft Dynamics 365 Connection.


Prerequisites

  • An active Azure subscription with permission to register applications in Azure Portal.

  • D365 Finance administrator access to register Microsoft Entra ID applications and assign security roles to the mapped D365 Finance user.

  • Your D365 Finance environment URL (for example https://your-env.operations.dynamics.com).


Part 1: Create an app in Microsoft Entra ID (Azure)

  1. Sign in to Azure Portal.

  2. Open Microsoft Entra ID > App registrations.

  3. Click + New registration.

    • Name: e.g. Limble D365 Finance Integration

    • Supported account types: Single tenant (typical for one customer tenant)

    • Redirect URI: leave blank (not used for client credentials)

    • Click Register

  4. On Overview, copy:

    • Application (client) ID

    • Directory (tenant) ID (needed for the token URL)

  5. Open Certificates & secrets > + New client secret.

    • Add a description and expiration.

    • Copy the Value immediately (not the Secret ID). You cannot view it again later.

  6. Open API permissions > + Add a permission.

    • Choose APIs my organization uses (or Dynamics ERP / Microsoft ERP depending on portal labels).

    • Select Dynamics ERP (Finance, not Dynamics CRM).

    • Check user_impersonation.

    • Click Add permissions.

  7. Click Grant admin consent for [tenant] so the permission shows as granted.

Values to save from Azure

Value

Where to find it

Client ID

App registration > Overview > Application (client) ID

Client secret

Certificates & secrets > secret Value

Token URL

https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token

Replace {tenant-id} with your Directory (tenant) ID.


Part 2: Register the app in D365 Finance

Why this step matters

Part 1 created an Azure app. That app’s Client ID and secret are what Prismatic uses to log into D365.

D365 Finance still needs to know which D365 Finance user that app is allowed to act as.

When you register the Azure app in D365 Finance and pick a User ID, you are saying: “Whenever this Azure app calls D365 Finance, treat those calls as this D365 Finance user.”

Important:

  • The integration does not act as the Limble user who clicked the button.

  • Every D365 Finance action from this integration (sync, create PR, create inventory journal, etc.) is done by one D365 Finance user - the user mapped here.

  • That is why customers should use a dedicated integration/service account, not a personal employee account.

Recommended D365 Finance user for this integration

Create (or choose) a dedicated D365 Finance user for Limble, for example:

  • LIMBLE_INTEGRATION

  • LIMBLE_SERVICE

Use this user for:

  1. The User ID mapping below

  2. Security roles / legal entity access

  3. Purchase requisition setup (Preparer / Requestor permissions)

  4. Workflow participation, if this user needs to submit or approve

Do not map the Azure app to a random personal user if you can avoid it. If that person leaves, the integration breaks.

Register the Azure app in D365 Finance

  1. Sign in to your D365 Finance environment.

  2. Go to System administration > Setup > Microsoft Entra ID applications.

  3. Click New.

  4. Enter:

    • Client ID: the Azure Application (client) ID from Part 1

    • Name: e.g. Limble integration

    • User ID: the dedicated D365 Finance integration user above

  5. Save.

Configure that D365 Finance user

After the mapping is saved, set up the mapped user like any real D365 Finance user the process depends on.

1. Security access

Assign roles with access to:

  • Vendors

  • Warehouses

  • Released products / items

  • On-hand inventory

  • Purchase requisitions

  • Purchase orders

  • Each legal entity the integration should use

2. Link the user to a Person / Worker

Purchase requisitions need a preparer. D365 Finance uses the worker linked to this mapped user as the preparer.

Check:

  1. System administration > Users > Users

  2. Open the mapped integration user

  3. Confirm a Person is assigned

  4. Save

Without this, PR creation can fail.

3. Purchase requisition permissions (By Preparer / By Requestor)

Because the integration always acts as this one user:

  • That user is usually the Preparer on PRs created from Limble

  • The Requestor may be a different worker (configured in the integration as Default Personnel Number)

If the preparer and requestor are different people, set up D365 Finance purchase requisition permissions so this integration user can create/order on behalf of the requestor.

4. Workflow setup

If your PR workflow requires a specific user to submit or approve:

  • Make sure this integration user is allowed to do what the process needs

  • Or assign workflow participation / delegation so the right people can act on PRs created by this user

Remember: Limble users do not appear as D365 Finance users. Only this mapped account does.

Note about Power Platform / Dataverse:

Some Microsoft docs talk about Power Platform admin center > S2S Apps for Dataverse/CRM (*.crm.dynamics.com).

This integration uses D365 Finance’s path above: System administration > Setup > Microsoft Entra ID applications.

Use the Power Platform path only if your organization’s architecture explicitly requires it for your D365 Finance deployment.


Part 3: Integration Configuration table

Open the Integration Configuration table and complete Microsoft Dynamics 365 Connection.

Connection type: OAuth 2.0 Client Credentials.

Configuration field

What to enter

Example

Client ID

Azure Application (client) ID

a1b2c3d4-e5f6-7890-abcd-ef1234567890

Client secret

Azure client secret Value

(secret string from Azure)

Token URL

Entra token endpoint for your tenant

https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token

Web API URL

D365 Finance environment root URL

https://your-env.operations.dynamics.com

Scopes

D365 Finance URL with /.default appended

https://your-env.operations.dynamics.com/.default

D365 Finance URL format (not CRM)

Environment

Typical URL pattern

Finance

https://{name}.operations.dynamics.com

Dynamics 365 Sales / CRM (not used by this integration)

https://{name}.crm.dynamics.com

The integration calls D365 Finance OData under /data/ (for example /data/PurchaseRequisitionHeaders).

Scopes

Use the same host as Web API URL, with /.default:

https://your-env.operations.dynamics.com/.default

Do not use a CRM URL unless your Web API URL is also CRM (this integration expects D365 Finance).


Verify the connection

Save the Integration Configuration table and click Connect.

Did this answer your question?