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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

APIs in Business Central Saas showing authentication failed?

(0) ShareShare
ReportReport
Posted on by 15

I have a Business Central container in Azure. I am able to connect to the BC instance. I perform a search for Users and retrieve the "Web Access Key"

I then call the following in Postman:

  api.businesscentral.dynamics.com/.../<Tenant Id>/sandbox/api/beta/companies

witH Basic Auth: username is the name in BC password is the Web Access Key.

The tenant Id i just retrieved from Azure Active Directory ->Overview

I get the following error:

{
    {
         "error": {
      "code": "Authentication_InvalidCredentials",
      "message": "The server has rejected the client credentials.  CorrelationId:  <GUID>."
    }
 }
      

Is there something I am missing here ?

I need to get the company id back so I can call the following , because I am using webhooks for push notifications like the following :

GET
https://{businesscentralPrefix}/api/microsoft/runtime/beta/companies({{companyId}})/webhookSupportedResou rces?$filter=resource eq 'v2.0*'

Also if i try to call the following:in Postman:

    api.businesscentral.dynamics.com/.../<IP ADDRESS SAAS CONTAINER>/BC/Sandbox/api/microsoft/automation/v1.0/$metadata

  It gives back 

{
    "error": {
        "code""RequestDataInvalid",
        "message""Request data is invalid."
    }
}
I would have expected to get back some data to be able to get companies and there id's .
Any ideas on this ?

I have the same question (0)
  • Suggested answer
    Andy Sather Profile Picture
    Microsoft Employee on at

    Hello Karen - In Postman I changed my GET to this and I got a Company list:

    api.businesscentral.dynamics.com/.../Company

    Let me know if this helps!

  • KarenSaunders Profile Picture
    15 on at

    Hi Andy,

    Still get the same error. Not sue if i am doing somethin wrong.

    These are the steps i took .

    I created a BC container on Azure using the command az container create .... now in that I could not specify the --includeTestToolKit as it was not a legal parameter. In the New-BCContainer that is a legal parameter but thats for onPrem, i wanted Saas.

    After creating the container on Azure I went to a browser and typed

    http://<IP ADDRESS OF CONTAINER IN AZURE>/BC/api/v2.0/$metadata

    to see if there are any installed Apis's.

    that returned an error:

             "Sorry, the page could not be found"

    So then I went to BC via the url and logged in with my username and password , typed in user in the search and selected ADMIN. I changed the web access key and saved. I then copied the web access key and went to Postman and put that in as the Basic Auth for name and password being the web access key, with a url of

    api.businesscentral.dynamics.com/.../<IP ADDRESS OF CONTAINER IN AZURE>/BC/sandbox/api/v1.0/$metdata.

    I would have thought it would have given a list of the available API's but sill gave

       <code>Unauthorized</code>

       <message>The credentials provided are incorrect</message>

    Can i somehow add the testtoolkit to the saas instance ?

    Or do i need to redeploy using another strategy ?

    Another question for knowledge: In the url for saas , I have a container that sits in a ResourceGroup, so if i get the tenant id from Azure AD, how will it know to go there ? 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,772 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,056 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 662 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans