I'm trying to create customer in business central using REST API with postman.
- I got token using OAuth2/Microsoft Entra Authentication.
- Dynamics 365 Business Central have /API.ReadWrite.All/ permission in azure portal.
- 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?