How to register an OAuth app for Microsoft Dynamics 365 Business Central
Before you get started, make sure you have a Microsoft developer account.
Set up a new application using Microsoft Entra
-
Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator.
-
If you have access to multiple tenants, use the Settings icon in the top menu to switch to the tenant in which you want to register the application from the Directories + subscriptions menu.
-
Browse to Identity > Applications > App registrations and select New registration.
-
When the Register an application page appears, enter your application's registration information:
- Name - Enter a meaningful application name that will be displayed to users of the app.
- Supported account types - Select Accounts in any organizational directory and personal Microsoft accounts
- Redirect URI: https://unify.apideck.com/vault/callback
-
When finished, select Register.
-
After completing the last step, Microsoft Entra admin assigns a unique application (client) ID to your app, and you're taken to your application's Overview page. Select Certificates & secrets > Client secrets > New client secret:
- Add a description for your client secret.
- Select an expiration for the secret or specify a custom lifetime. Client secret lifetime is limited to two years (24 months) or less. You can't specify a custom lifetime longer than 24 months.
- Select Add.
- Record the secret's value for use in your client application code. This secret value is never displayed again after you leave this page.
💡 TIP: Copy the "Client Id" and the "Client secret". You will need them in the next step.
-
On the API Permissions page, select Add a Permission > Dynamics 365 Business Central > Delegated Permissions. And select: user_impersonation and Financials.ReadWrite.All
-
On the API Permissions page, select Add a Permission > Dynamics 365 Business Central > Application Permissions. And select: app_access, AdminCenter.ReadWrite.All, API.ReadWrite.All and Automation.ReadWrite.All
-
To add additional capabilities to your application, you can select other configuration options including branding, certificates and secrets, API permissions, and more.
Vault Connection Setup
Now that you have your Microsoft Dynamics 365 Business Central App credentials, you can enable the integration to connect to your Microsoft Dynamics 365 Business Central instance in a secure manner. Once this is done you can start testing it by using the Apideck Accounting API.
Go to the Apideck > Configuration > Accounting API > Microsoft Dynamics 365 Business Central
Enter the OAuth client ID & Secret from Microsoft Dynamics 365 Business Central and review if the scopes granted in Microsoft Dynamics 365 Business Central match with the scopes you are requesting in Apideck.
Press "Save settings" to save your credentials.
You can test the connection by clicking "Test Vault", which will check if the connection is working.
Now you are ready and clients can authorize the connection to their Microsoft Dynamics 365 Business Central account securely.