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...
Answered

ODATA returning error 400

(3) ShareShare
ReportReport
Posted on by 26

Hey everyone,

I'm really new to programming in AL, and I'm facing a small issue with accessing a self-published OData query.

To start, I just wanted to get a successful GET request without errors, so I published the following query in BC:

 

query 50103 "TestFürWebServices"
{
QueryType = API;
APIPublisher = 'tammo';
APIGroup = 'custom';
APIVersion = 'v1.0';
EntityName = 'kreditor';
EntitySetName = 'kreditoren';

elements
{
dataitem(Kreditor; Vendor)
{
column(NevarisName; Name)
{
}
}
}
}

However, when I check the result in Postman or a browser, I get the following response:

 
"error": {
"code": "Internal_ServerError",
"message": "Sorry, the current permissions prevented the action."
}

I have already checked my permissions and I have SUPER permissions, so I don't understand what is causing this issue.

I'm really grateful for any help or suggestions!

 

UPDATE:

Hey, first of all thanks for the support so far :) I implemented OData and assigned the permission sets, but I'm still getting error messages. When I use OData for authorization, I get the following error with my own API:

I have the same question (0)
  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,306 Super User 2026 Season 1 on at
    Are you using OAuth2 authentication to access your API?
    To access API, you need OAuth2. If you use OAuth2, you won't be able to use SUPER permission.
     
    You can check the following blog on how to setup and test OAuth2.
     
  • Verified answer
    YUN ZHU Profile Picture
    100,644 Super User 2026 Season 1 on at
    You use OData, which has nothing to do with your current user permissions.
    Please confirm the permissions below. (This user cannot set Super permissions)
     
    Thanks.
    ZHU
  • TC-03021259-0 Profile Picture
    26 on at
    I can successfully use the default queries provided by BC in Postman, but when I try to access my own published queries, it doesn't work.
  • Gerardo Rentería García Profile Picture
    26,509 Most Valuable Professional on at
    Hi
    As our colleague Yun's image shows, have you been able to add the permissions for your new extension here?
     
    Best
    GR
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    22,365 Super User 2026 Season 1 on at
    Have you generated permission for the specific extension.
     
     
    and set extension name in User permission set on the Microsoft Entra Application page.
  • Suggested answer
    YUN ZHU Profile Picture
    100,644 Super User 2026 Season 1 on at
    In addition, please confirm that your Endpoint is correct.
    And, whether you have accessed the correct company and whether the company is restricted in the permissions.
     
    Thanks.
    ZHU
  • TC-03021259-0 Profile Picture
    26 on at
    Hey,
     
    first of all thanks for the support so far :)
    I implemented OData and assigned the permission sets, but I'm still getting error messages.
    When I use OData for authorization, I get the following error with my own API: 
    The BC-API works fine. 
     
    Does anyone have any idea how to fix this?
     
    I'm really grateful for any help or suggestions!
     
     
     
     
     

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,995 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,147 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 893

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans