Skip to main content

Setup API Connection D365 F&O

Microsoft Azure

App Registration

Open URL: https://portal.azure.com/#home.

  1. Click on App registrations
  2. Click on "New registration".
NKkCQz9icqKLyder-drawing-8-1780315123.png

Name

This should be a common name, e.g. "DeDeSales API Access"

Supported account types

Usually, "Accounts in this organisational directory only - ..." with your client name should be selected here. If access to multiple clients is required, you must configure this accordingly.

Set redirect URIs

Two URIs are required for your test and production systems respectively. Always select "Web" as the platform.

image.png

The following URLs were used in the screenshot:

  1. https://usnconeboxax1aos.cloud.onebox.dynamics.com/
  2. https://usnconeboxax1aos.cloud.onebox.dynamics.com/oauth/

You may not need to enter any URLs here, depending on your environment.
If you do enter any, you must enter your URLs. The example URLs shown here will not work for you.

Now click on "Register"


Create client secret

Under "Manage", click on "Certificates & secrets". Select "New client secret" there.

image.png

Name the secret "Secret" and select a duration of 24 Months. Then click "Add".

image.png

The secret key will now be displayed in the "Value" column.

image.png

Attention! This is only visible once and must be copied now, as we will need it.

API permissions

Now add the permissions shown here.

  1. Click on "Add a permission"
  2. Select the permissions shown below in Dynamics ERP.
  3. The Microsoft Graph "User.Read" permission is also required.
  4. Click on "Grant admin consent"
GLMvpcfiO0go8YAD-drawing-8-1780311981.png

Application ID (Client)

You can find the Application ID by clicking on Summary. Copy the Application ID that appears, as we will need it. 

D365 Finance & Operation

Microsoft Entra ID applications

Open D365 F&O and search for "Microsoft Entra ID applications". 

For example accessible under:
Modules -> System administration -> +Expand All -> under the Category "Settings-> Microsoft Entra ID applications

Create a new entry and enter the following:

  1. Application ID
  2. Name as specified above: "DeDeSales API Access"
  3. Select a user under whose context the API call will be made by us. 
    1. Use a strong password
    2. Do not select that a password change is required on first login.
    3. Disable MFA for the user
    4. Assign the user the correct role and rights. Your Project manager will provide an overview of access to the required entities.
    5. The role "System user" is Mandatory and must be assigned to the user.
dcqIqrju23jImrYy-drawing-8-1780315822.png

Security configuration

The permissions described here cover the standard Connector of DeDeSales. For individual customisations, the permissions must be extended accordingly.

Do not forget to publish the Privileges and Roles after creation!

Privileges

Please create a new entry: DeDeSales API

Entities

Assign the following entities and grant the corresponding rights.

Entity Read Update Create Delete
CustCustomerV3Entity Grant Unset Unset Unset
CustomerPaymentMethodEntity Grant Unset Unset Unset
DeliveryTermsEntity Grant Unset Unset Unset
EcoResProductBarcodeV3Entity Grant Unset Unset Unset
EcoResProductV2Entity Grant Unset Unset Unset
EcoResReleasedProductV2Entity Grant Unset Unset Unset
InventProductSpecificOrderSettingsV3Entity Grant Unset Unset Unset
PaymentTermEntity Grant Unset Unset Unset
SalesOrderHeaderV2Entity Grant Grant Grant Grant
SalesOrderLineV2Entity Grant Grant Grant Grant
smmContactPersonV2Entity Grant Grant Grant Grant
smmEmploymentJobFunctionEntity Grant Unset Unset Unset
InventWarehouseInventoryStatusOnHandEntity Grant Unset Unset Unset
EcoResProductLifecycleStateEntity Grant Unset Unset Unset

Roles

Create a role named "DeDeSales API Role".

Duties

Add the following:

  • Maintain Contacts

Privileges

Add the following:

  • DeDeSales API
  • DeDeSalesPriceDiscountsView

Completion

Test the API

The API must be accessible under the URL given above with /metadata and return the following result. Example: https://usnconeboxax1aos.cloud.onebox.dynamics.com/metadata/DataEntities

image.png

From your setup we need

  1. Application ID
  2. Secret
  3. TenantId
  4. URL