The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 Code
browser Access
Pbi 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 Request
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?
Best Regards
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!