Skip to main content

Notifications

Announcements

No record found.

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

Error while get and post using custom api and custom pages and tables

Posted on by 80
Hello,
I’ve developed a custom API along with custom pages and tables. However, when attempting to post data, I encounter an error related to permissions, even though I’ve assigned the necessary permission set.
Could you please provide more details about the specific error message you’re receiving? Additionally, any relevant context or steps you’ve taken so far would be helpful for further investigation.
 
 
  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    Error while get and post using custom api and custom pages and tables
    If you accessing your API outside the environment you need to go with Authorization, you can create OAuth2.0 authorization with this link  https://www.navwithnav.com/bc-oauth2-0-token-based-authentication/
     
    And then you also need to Add your app id in "Microsoft Entra application" page in BC, you can put the generated token in as a Bearer <Token>and try,
     
    I hope it will solve your problem.
     
  • Suggested answer
    gdrenteria Profile Picture
    gdrenteria 12,167 Most Valuable Professional on at
    Error while get and post using custom api and custom pages and tables
    Hi
     
    Excuse me, have you created an API type page?
    I mention this because following the following link, apparently the call is not appropriate. I hope it can give you some ideas.
     
     
    POST https://api.businesscentral.dynamics.com/v2.0/<environmentName>/api/bctech/demo/v1.0/companies(<company id>)/carBrands
    {
        "name": "CARBRAND1",
        "description": "Car Brand 1",
        "country": "Italy"
    }
    Best regards
    Gerardo

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans