I am trying to call sandboxed BC cloud API using basic authentication and am getting the following error:
<error xmlns="">docs.oasis-open.org/.../metadata">
<code>Unauthorized</code>
<message>The credentials provided are incorrect</message>
</error>
Get the error when using Postman and code solution.
The basic URL is following:
https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v1.0/companies(sdfsdfsdff0-cwerwerwer4ewerwer-werwe)/accounts
Now this works with OAuth2 bearer token using Postman and code.
I have copied the key from my user name and I have copied the complete key.
Basic auth calls are working fine in Docker sandboxed enviroment with Postman and code. The interesting thing is at first glance the above error would point to credentials issue (id or password) however if I set the wrong password with basic auth in Sandbox I get the following error:
{
"error": {
"code": "Authentication_InvalidCredentials",
"message": "The server has rejected the client credentials. CorrelationId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx."
}
}
Searches against the first error message appear to relate more to AD tenant authentication.
TIA for any help.