Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

REST API, POST customer request failed

(0) ShareShare
ReportReport
Posted on by 8
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?
  • Suggested answer
    Ariba Mehdi Profile Picture
    Ariba Mehdi 160 on at
    REST API, POST customer request failed
    Hi,
    Try creating XML file that generates permission set. You can go to visual studio where the extension is open. Open command palette and select the following. The xml file will be created. Build the extension again and run it. 
     
    Hope this helps!
  • Suggested answer
    Judy Profile Picture
    Judy Microsoft Employee on at
    REST API, POST customer request failed
    Hi, please check the steps to set up service-to-service authentication:
  • Suggested answer
    DAnny3211 Profile Picture
    DAnny3211 9,274 Super User 2024 Season 1 on at
  • MG-04060224-0 Profile Picture
    MG-04060224-0 8 on at
    REST API, POST customer request failed
    Which Application ID should I use in Client ID part? For testing with postman and external, custom-made web.
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 75,883 Super User 2024 Season 2 on at
    REST API, POST customer request failed
    Hi, It looks like you haven't assigned permissions to the MS Entra App.
    Hope the following can give you some hints.
     
    Thanks.
    ZHU
  • Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    REST API, POST customer request failed
    Check the permissions associated to the app registration inside BC.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,759 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,468 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans