web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Business Central API grant type "client_credentials" / Oauth2

(0) ShareShare
ReportReport
Posted on by 10

Anyone succeeded in creating a connection to the Business central API (https://docs.microsoft.com/da-dk/dynamics-nav/api-reference/v1.0/) 

Can see others have issues with it as well:

https://community.dynamics.com/business/f/dynamics-365-business-central-forum/292569/business-central-api---authentication-with-client-id-and-secret/914168#914168

https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb/issues/517

According to this: https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow

i should be able to create an auth token i can use on my server that is consuming the Business central API. But i alwaus get "401 Unauthorized" Or "400 Bad Request". 

Can anyone help?

What i've done so far:

  1. registered "Dynamics 365 Business Central" in Azure Active Directory
  2. Added Client secret
  3. Added API permissions for "Application permissions" for "Dynamics 365 Business Central"
  4. Created Request in postman (changed client secret):

postman1.png

postman2.png

What am i doing wrong? Wrong scope? Or maybe wrong setup in AAD?

I really want to avoid using basic auth in production

  • I Gusti Made Ari Profile Picture
    3,608 on at
  • Soeren Frisk Profile Picture
    10 on at

    Sorry the post explains "delegated permissions". Not "application permissions", i'll update my question to make that clearer. Thanks

  • bc-developer Profile Picture
    10 on at
  • Thenerdy Profile Picture
    35 on at

    All if this helps anyone - I was getting something similar and what helped me was to add to the application in Azure - a scope of default without the .


    In the scope section within Postman add the following:
    https://api.businesscentral.dynamics.com/.default

    This fixed the issue for me was able to add a valid token and using it

    Screen-Shot-2022_2D00_11_2D00_05-at-19.28.58.jpg

  • Suggested answer
    DAnny3211 Profile Picture
    11,427 Super User 2026 Season 1 on at
  • Suggested answer
    YUN ZHU Profile Picture
    104,123 Super User 2026 Season 2 on at

    Just adding some info.

    Using OAuth to connect Business Central APIs and Web Service in Postman

    https://yzhums.com/20690/

    Hope this helps as well.

    Thanks.

    ZHU

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 631 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 409 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 222 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans