Skip to main content

Notifications

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

  • Suggested answer
    adel@vsi Profile Picture
    45 on at
    RE: APIs in Business Central showing authentication failed

    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.

  • Jyotsna NAV Profile Picture
    585 on at
    RE: APIs in Business Central showing authentication failed

    Hi Stefano,

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

    Thank you everyone for your help :)

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: APIs in Business Central showing authentication failed

    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
    RE: APIs in Business Central showing authentication failed

    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
    RE: APIs in Business Central showing authentication failed

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

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

  • Suggested answer
    Binesh Profile Picture
    7,885 on at
    RE: APIs in Business Central showing authentication failed

    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
    Teddy Herryanto (That NAV Guy) Profile Picture
    13,643 Moderator on at
    RE: APIs in Business Central showing authentication failed

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

  • Jyotsna NAV Profile Picture
    585 on at
    RE: APIs in Business Central showing authentication failed

    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
    13,643 Moderator on at
    RE: APIs in Business Central showing authentication failed

    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.

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 1,234

#2
YUN ZHU Profile Picture

YUN ZHU 1,006 Super User 2025 Season 1

#3
Mansi Soni Profile Picture

Mansi Soni 872

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans