Hi All,
Integrations are something I am really passionate about and are one of my favourites implementations!
Before you can start a development, the basic and first thing to do is to setup a connection.
If you're working with Microsoft Dynamics 365 Business Central SaaS and need to connect through APIs — whether for integrations, automation, or custom apps — you'll need to register your app in Microsoft Entra ID (previously Azure AD). This enables secure OAuth 2.0 authentication and gives your app the right permissions to talk to Business Central.
Here is what you need to do:
1. Register Your App in Azure
Start by logging in to the Azure Portal.
-
Search for App registration
-
Click on App registrations > New registration.
-
Fill in the details:
-
Name: Give your app a name, like Business Central API App
-
New platform: https://businesscentral.dynamics.com/OAuthLanding.htm
Supported account types: Choose “Accounts in this organisational directory only” for most business use cases.
-
-
Hit Register.
2. Add API permissions
Next, you’ll give your app permission to access Business Central data.
-
In your registered app, go to API permissions > + Add a permission.
-
Click on APIs my organization uses, then search for Dynamics 365 Business Central.
-
Select it, then choose Delegated permission
-
Click Add permissions.
-
Finally, click Grant admin consent so your app can use them without prompting the user.
3. Create Client Secret
Now, we need to give the app a way to prove its identity.
-
Go to Certificates & secrets.
-
Under Client secrets, click + New client secret.
-
Add a description, set an expiration period (e.g., 6 months or 12 months), and click Add.
-
Copy the generated secret immediately — you won’t be able to view it again later.
4. Setup in Business Central
Now head over to Business Central to connect the dots.
-
In Business Central, search for Microsoft Entra Applications.
-
Click + New.
-
Enter the Client ID from your Azure app.
-
Assign the appropriate user permissions (e.g., SUPER, D365 API User, or custom permission sets).
-
Change status to Enable
You’re all set up to start making secure API calls using OAuth 2.0. Your app can now authenticate, access data, and integrate seamlessly with Business Central.
If you're using tools like Postman, generate a Token and use an endpoint. You are good to go!
Reach out to me if you have any questions or suggestions.
Check out other blogs, if you haven't already.
No comments:
Post a Comment