OAuth 2.0 Client Credential Grant for Dynamics 365 Business Central

it_businesscentral 121 Reputation points


Wanted to create a windows console service that will run on the backend of a server to connect to my application and to Dynamics 365: Business Central.
Planning to use OAuth 2.0 client credentials to get token and consume business central endpoints.

Here are the following steps I have made so far:

Also tried the postman example provided inthe documentation, they, however, will return a token but not the correct one as it is unauthorized

GetAccessToken code similar to this https://api.codeproject.com/Samples/ClientCredCsDoc

Would really appreciate help here

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,528 questions
{count} vote

Accepted answer
  1. AmanpreetSingh-MSFT 56,491 Reputation points

    Hi @it_businesscentral · Thank you for reaching out.

    Could you please share what error you are getting while requesting for the token using Client_Credentials flow?

    I have provided a screenshot of the call from my tenant for your reference:



    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

0 additional answers

Sort by: Most helpful