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

Error while trying to sign into api.businesscentral.dynamics

(1) ShareShare
ReportReport
Posted on by 22

Hello, 

i am getting this error while trying to sign into API.  I tried with in chrome/edge with regular password and web service key. 

api.businesscentral.dynamics.com

{"error":{"code":"Authentication_InvalidCredentials","message":"The server has rejected the client credentials.  CorrelationId:  68c4bb8f-eb12-4c45-8f26-ee16aa4a0fe6."}}
I have the same question (0)
  • Suggested answer
    JAngle Profile Picture
    133 on at

    Is this SaaS? If so basic authentication has been deprecated: docs.microsoft.com/.../web-services-authentication

    Move to OAuth. Plenty of documentation available for aiding with this. Plenty of good blog posts here: https://www.kauffmann.nl/

  • Suggested answer
    YUN ZHU Profile Picture
    95,729 Super User 2025 Season 2 on at

    Hi, hope the following also helps.

    https://yzhums.com/20690/

    PS: some info from Kauffmann

    pastedimage1651018550250v1.png

    pastedimage1651018557659v2.png

    pastedimage1651018564732v3.png

    pastedimage1651018577399v4.png

    Thanks.

    ZHU

  • Suggested answer
    Krati21 Profile Picture
    77 on at

    Hi,

    If you try to log into BC20 SaaS environment where web-service key is deprecated, you get an error like this:

    pastedimage1651031346230v1.png

    If that's the case, previous answers on the post will help where you need to use OAuth.

    But your error probably means you are just logging in with a wrong web-service key. Please make sure you use the latest web-service key from the user card.

  • Suggested answer
    Mayank M Jangid Profile Picture
    8 on at
  • Suggested answer
    Moisesito Profile Picture
    80 on at
    Hi, I know this is an old post, but Just in case you're still looking for the solution,
    1. Go to Azure portal (https://portal.azure.com)
    2. Search for App Registration
    3. Create New App eg. BC Integration
    4. Once the App registration is created, on the left Pane sellect API Permissions. Add API Permissions > Search and Select (Business Central > API.Read Write Access). Select Applications Permissions not Delegate Permissions and click Add Permission.
    5. It will return to the App Permission List. Click on Grant Admin Consent.
    6. Now on the left pane select Certificates & Secrets.
    7. Click on new client secrets.
    8. Add Description (e.g BC Integration App), Select an Expiry Date, click add.
    9. Make note of the Secret Value column as this will disappear. (You will need to provide this value to the external App, so they can access the api)
    10. In the left pane select Overview, make note of the Application (client) ID. This will also be needed by the external App
    11. On the overview page, you will also see the option for Endpoints. click on it to open a pane on the right. Copy the URLs (OAuth 2.0 authorization endpoint (v2), OAuth 2.0 token endpoint (v2)) This will also be needed in the apps for authentication.
    12. Set Redirect URL to https://businesscentral.dynamics.com/OAuthLanding.htm. To do this, Stay on the Overview Page and in the midle you would see Redirect URIs : Add a Redirect URI. Click on the link, That should open a different page, Click on Add a platform > Web and add the url in the textbox provided https://businesscentral.dynamics.com/OAuthLanding.htm, Press add to continue. (In case the URL is incorrect, the correct URL is provided when you try to grant consent to the app in Business central in step 17)
    13. Go to Business Central Search for Microsoft Entra Applications
    14. Press the new button
    15. Copy the client ID/ App Id from the App registration (Client and app ids are the same thing)
    16. Change the state to enabled
    17. Select the grant access button to grant permissions
    18. Add a permission set e.g. SUPER (DATA) or anything suitable for the situation. For UAT Super (DATA) is ok, but in production, the permissions need to be specialised.
    19. In case you are using a sandbox that has been created from another environment, and you are planning to reuse the Entra Application. Make sure to disable the Entra Application and re-Enable it as this can give a weird authentication error.

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,238

#2
YUN ZHU Profile Picture

YUN ZHU 773 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 630

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans