Skip to main content
Suggested answer

REST API, POST customer request failed

editSubscribe (0) ShareShare
ReportReport
Posted on by 2
I'm trying to create customer in business central using REST API with postman.
  1. I got token using OAuth2/Microsoft Entra Authentication.
  2. Dynamics 365 Business Central have /API.ReadWrite.All/ permission in azure portal.
  3. Client ID/Application have ADMINISTRATOR, D365 FULL ACCESS permission in Business Central -> Microsoft Entra Application
Get request to https:/api.businesscentral.dynamics.com/v2.0/tenantid/environmentname/api/v2.0/companies(id)/customers works fine but post request returns: 
400 Bad Request
{
    /error/: {
        /code/: /Internal_ServerError/,
        /message/: /Sorry, the current permissions prevented the action. (TableData 5050 Contact Insert: Base Application)  CorrelationId:  09bb1b44-5240-47d4-9e1e-55ea966ef3f9./
    }
}
What am I doing wrong? Where should I set required permissions?