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...
Answered

APIs in Business Central showing authentication failed

(0) ShareShare
ReportReport
Posted on by 585

Hello Experts, 

I am using Basic Authentication and web Access Key to hit Business Central API: https://api.businesscentral.dynamics.com/v1.0/domainname/Sandbox/api/beta/companies with a GET request. 

Unfortunately, I am getting an error from Postman:

{
    "error": {
        "code""Authentication_InvalidCredentials",
        "message""The server has rejected the client credentials.  CorrelationId:  5e0b0833-cef9-4e89-9628-56400f373b2a."
    }
}
Could you please help me out with this.
 
Thank you in advance. 

Regards

Jyotsna Oberai

I have the same question (0)
  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,284 Super User 2025 Season 2 on at

    Make sure you use the User Name and Web Service Access Key that are written in the User Card.

    That user also needs to have BC license in that environment. You can't use partner login.

  • Jyotsna NAV Profile Picture
    585 on at

    Thank you for the revert.

    The credentials are correct. The URL is the one that exists in web service: https://api.businesscentral.dynamics.com/tenantId/Sandbox/api/beta

    Still no luck. Please suggest..

    Thank you.

    Regards

    Jyotsna Oberai

  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,284 Super User 2025 Season 2 on at

    Are you using the customer's user ID or partner user ID ?

  • Suggested answer
    Binesh Profile Picture
    7,885 on at

    Hello Jyotsna,

    if you are make sure your web access key is correct then just  make a small change in the API URL

    Instead of v1.0 replace with v2.0 as shown below

    pastedimage1596176382289v1.png

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    It seems you're missing the API version. Correct url:

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

  • Jyotsna NAV Profile Picture
    585 on at

    I tried that. But I am still facing the same error. Don't know what the problem is :(

    4152.Untitled.png

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    The endpoint I’ve provided works. 
    If the endpoint is correct, please check username (use it without domain), web service access key and its expiration date.

  • Jyotsna NAV Profile Picture
    585 on at

    Hi Stefano,

    It worked! I was missing v1.0 in the url. Thanks a lot!

    Thank you everyone for your help :)

  • Suggested answer
    adel@vsi Profile Picture
    45 on at

    Following worked for me for basic authentication.

    1. User user name without domain

    2. If using google chrome, user developer tools to get the web-services key. Simply copy doesn't copy whole thing.

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 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans