Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Need help connecting APIS by Odata method from Business Central to PBI

 

Hello everyone, I am new to this community. Nice to greet you.
As I wrote in the title, I have a problem when connecting custom Apis to a Power bi report I want to make.
When I create the Api from VScode, I do it as I have always done, then I publish it to my BC server, and configure the web service for that page, getting my link to enter it in the connection tab of my report. But when I try to connect the API to the powerbi, I get this error time after time. I also tried opening the api link in my browser to see if I could view the data, but I also get an error. I have tried many things, but nothing works; and the browser error tells me I have no permissions, but my business central user is SUPER.
I don't know if anyone could help me, but I would really appreciate it.

I attach here below the images, and the full error text from powerbi.

Api CodeApi Codebrowser Accessbrowser AccessPbi AccesPbi Acces

Details: “Microsoft.Mashup.Engine1.Library.Resources.HttpResource: Error in request:
OData version: 3 and 4, error: Remote server error: (400) Incorrect request. (You do not have the following permissions on Page ApiSalesHeaderSalesforce: Execute.

For details on your permissions, see the Permissions in effect page. To report a problem, see the following server session id: '97'. CorrelationId: 98f4314a-e192-41f0-812c-a08227b77d7e.)
OData version: 4, error: Remote server error: (400) Incorrect request. (You do not have the following permissions on Page ApiSalesHeaderSalesforce: Execute.

For details about your permissions, see the Permissions in effect page. To report a problem, see the following server session id: '98'. CorrelationId: d0cc7b0e-d01a-40d0-ac45-1583a0e403b2.)”

 

**EDITED:: I forgot to mention that with the SOAP method, i can acces to all the api information without any problems

SOAP browser RequestSOAP browser Request

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

Base on your description,it sounds like you’re encountering a permissions issue when trying to connect your custom API from Business Central to Power BI using the OData method. You can refer the following links to connect it in Power BI Desktop:

Enabling Power BI integration with Business Central - Business Central | Microsoft Learn

Connect to Power BI from Business Central on-premises - Business Central | Microsoft Learn

Reporting With OData Queries in Business Central – Part 1 

 

In addition, Could you please check the following info for the further troubleshooting?

  • Test API: Use tools like Postman or directly entering the OData URL in a browser to manually test the API endpoint. If you still receive a permissions error, reassess the permissions for the user and the API page.
  • Ensure that you are using the correct OData URL and that the authentication method matches what is configured in Business Central When connecting to Power BI.

Best Regards

Anonymous
Not applicable

Thank you very much for your reply, I appreciate it very much.
All that you mention, I already tried it and it didn't work.
Trying things to rule out the problem, I found the solution by chance.
It turned out that my problem was in the objects IDs , which I had assigned as 50510,50511....
So it seems it could be a license problem or something like that, because I made again the apis to see if they worked, and when I made them again I assigned them an id 50060,50061,50062.... And they worked correctly at the first time.
I do not know if it could be a problem that I did not have so much range of objects in my license, but I tried to do everything, change the permissions of my user, create a specific permissionset for each api, and none of that was working. It was the ID problem.
Still, I thank you very much for your help and the complete answer you gave me. Im sure I will certainly post again if I have any more questions.
Regards!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.