web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Adding new element to BC Custom Table through BC Custom API using C#

(5) ShareShare
ReportReport
Posted on by 16
HI,
I have an application that needs to interact with BC.
For that purpose, I am using Azure function that will query BC.
I have already created a custom table + custom API.
Am able to fetch data, update data, but cannot insert new record.
I have already set the permission to the tabledata  as RIMD.
However, creating record through postman works well, but in c#, it is giving me permission error.
I would like to know if there are any means or anything that I have missed.
In C#, I tried both through odata class and direct raw posting. but none is working.
I have the same question (0)
  • Suggested answer
    Dhiren Nagar Profile Picture
    2,876 Super User 2026 Season 1 on at
    Hi,
     
    I hope you are using App Registration in Azure for connecting with BC.
     
    If yes, make sure that through Azure function and postman you are using same credentials.
     
    Also check the permission for App user in BC.
     
    Regards,
    Dhiren.
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    21,573 Super User 2026 Season 1 on at
    Can you share the exact error message?
  • Suggested answer
    OussamaSabbouh Profile Picture
    11,500 Super User 2026 Season 1 on at
    Hello,
     
    Nothing is wrong with your table permissions: Permissions = tabledata = RIMD only applies to AL code running inside BC, not to external API calls. Your issue is almost certainly authentication context—Postman usually works because it uses a delegated user token (your BC user already has permission sets), while your C# Azure Function likely uses client-credentials (app-only) auth, which BC treats as a separate identity with no permission sets by default. You must add the Entra App Registration into Business Central and assign it permission sets (or SUPER temporarily to confirm), ensure the token scope is https://api.businesscentral.dynamics.com/.default, and then POST will work; the fastest proof is to reuse the exact same access token from Postman in C# and see it succeed.
  • Suggested answer
    YUN ZHU Profile Picture
    98,311 Super User 2026 Season 1 on at
    This is clearly a problem with OAuth 2.0 authentication processing in C#.
    Hopefully, the following information will give you some hitns.
    Can we get all environments within BC via AL (Not in Admin Center)
     
    Thanks.
    ZHU
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,986 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,071 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 975 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans