OAuth 2.0 Client Credential Grant for Dynamics 365 Business Central

TESDeveloperTESDeveloper Member Posts: 41
edited 2022-08-19 in NAV Three Tier
I am attempting to connect to any of the Business Central Web Services via postman using the grant type client_credentials.

I can receive a token from the call below ok:

Images removed as contained sensitive Data.


However, if I attempt to use this token in the call below I receive error 401.

Images removed as contained sensitive Data.


I have the App Registration set up with the following granted permissions:

Images removed as contained sensitive Data.

I also have the Azure Application registered and granted in Business Central.

Any help is appreciated.

Edit: RESOLVED!

The issue was that I was calling the incorrect token URL. This should have been https://login.microsoftonline.com/{tenant ID}/oauth2/v2.0/token





Answers

Sign In or Register to comment.