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

Business Central API Connection - The credentials provided are incorrect

(0) ShareShare
ReportReport
Posted on by 13

Hi All,

Thanks in advance for anyone that might help me. I've read as many posts as I can find on this subject but unfortunately none of these are helping me.

I have setup POSTMAN and a Python script to access the REST api from Business Central with partial success and i'm confused.

I have setup everything I can find within Azure, the App, all the secrets, client id's etc. I've setup some role permissions and granted consent etc

I have setup POSTMAN, I can retrieve a token successfully which is great and shows I'm using the right information however when I try to use that token and retrieve anything from Business Central it tells me that "the Credentials Provided are incorrect".

The URL i'm trying to get is: https://api.businesscentral.dynamics.com/v2.0/[My TenantID]/Sandbox/api/v2.0/companies

If anyone can help me diagnose and fix the issue id be very grateful.

Thanks

Lee

  • AmplioSolutions Profile Picture
    13 on at
    RE: Business Central API Connection - The credentials provided are incorrect

    Thank you Inge, I do feel like this is where the issue lies but I'm struggling to pinpoint the problem.

    So I have gone to Azure Active Directory page in business central, created an entry using my Client ID, given it permissions for D365 BUS FULL ACCESS and enabled it. Then clicked the Grant Consent button which successfully granted.

    I'm not sure if there's anything else I need to do? If there is (and i'm hoping there is) I think this will be the missing piece of the puzzle.

    Regards

    Lee

  • YUN ZHU Profile Picture
    79,278 Super User 2025 Season 1 on at
    RE: Business Central API Connection - The credentials provided are incorrect

    Hi, I just tested it and it seems to work fine.

    My test endpoint:

    api.businesscentral.dynamics.com/.../companies

    pastedimage1676251460313v1.png

    More details: https://yzhums.com/20690/

    Hope this helps.

    Thanks.

    ZHU

  • Suggested answer
    Inge M. Bruvik Profile Picture
    999 Moderator on at
    RE: Business Central API Connection - The credentials provided are incorrect

    Have you checked the API's permissions inside Business Central so it actually can access the company list?

  • AmplioSolutions Profile Picture
    13 on at
    RE: Business Central API Connection - The credentials provided are incorrect

    Thanks Daniele,

    I have also completed this. My last resort is posting in this forum, if anyone can offer any troubleshooting advice I would be grateful

  • Suggested answer
    DAnny3211 Profile Picture
    9,274 Moderator on at
    RE: Business Central API Connection - The credentials provided are incorrect

    hi

    look this

    https://www.kauffmann.nl/2022/02/23/configuring-business-central-for-azure-active-directory-authentication-and-oauth-2/

    DAniele

  • AmplioSolutions Profile Picture
    13 on at
    RE: Business Central API Connection - The credentials provided are incorrect

    Thanks Daniele,

    I can successfully retrieve a token, I cannot create anything like your post as I don’t have the company to send the request too… hence why I am trying to retrieve the company list.

    I don’t understand why it’s saying my credentials are incorrect

  • Suggested answer
    DAnny3211 Profile Picture
    9,274 Moderator on at
    RE: Business Central API Connection - The credentials provided are incorrect

    hi

    look  this

    danieleincalza.blogspot.com/.../oauth20-business-central-app.html

    danieleincalza.blogspot.com/.../business-central-bye-bye-basic.html

    DAniele

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,278 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,002 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans