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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Incorrect credentials with OAuth 2.0 on Business Central on Premise

(0) ShareShare
ReportReport
Posted on by 71

Hi everyone, not sure if this is the right forum to post,

I've spent a lot of time on this topic and I must have missed something since I can't make any progress.

We plan on creating custom APIs for Business Central in order to replace our SOAP web services. I just tried to configure a simple custom items API to test but I just can't make the OAuth work.

I was able to configure the OAuth on a test SAAS base - it works just fine - but I'm blocked when trying on my on premise base. 

I can generate a token but when I use it, I still obtain the "The credentials provided are incorrect" error message on Postman.

I followed this guide https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/automation-apis-using-s2s-authentication but it hasn't solved my problem. I tried different ways to connect my Business Central base to Azure but nothing seems to be doing the trick.

Here are my Postman parameters for reference : 7446.Sans-titre.png

Is there something i'm doing wrong ? 

I have the same question (0)
  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    Typically using localhost is not the best option to choose from.  Here are my settings:

    pastedimage1656666047665v2.png

    Call Back Url: d365bc.<<replaced>>/.../OAuthLanding.htm

    Auth Url: login.microsoftonline.com/{{TENANTAADID}}/oauth2/authorize

    Token Url: login.microsoftonline.com/{{TENANTAADID}}/oauth2/token

    SCOPE: https://api.businesscentral.dynamics.com/.default

    You also need to get consent in Azure Active Directory Applications (only add client ID and a name and some permissions). 

    Hope it helps.

  • Valentine Motin Profile Picture
    71 on at

    Hi Marco, thanks for your reply.

    Unfortunately no, even with your suggestions I still have an issue with incorrect credentials. I tried to modify my setup like you did, even change it not to have a localhost in the callback url but it didn't do anything. I don't know why it's not working.

    On a side note, I know Basic Auth is depreciated for SAAS, but is it the case for on premise ? Every info I found seems to indicate that on premise isn't concerned, but since can't even make the basic auth work (i get the same Incorrect credentials message) I wonder if that's the case.

    Best regards

  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    Basic Authentication is still supported in OnPrem. Feel free to raise this to Microsoft.

    Thank you.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,664

#2
YUN ZHU Profile Picture

YUN ZHU 960 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 773 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans