Forum Discussion
Power BI Rest API & C#
Hi _Ilocans ,
Based on my research in the official docs, if you are trying to run any DAX query against the Power BI dataset, you need to enable the XMLA endpoint for the third-party tool connectivity to it, if you haven't enabled any XMLA endpoint for for Power BI dataset hosted capacity, you can't achieve the connectivity, but the XMLA endpoint needs the Premium/PPU capacity hosted as the document mentioned:
So if you want to run any DAX query against the Power BI dataset, you need to at least have the PPU/Premium capacity hosted datasets.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- _Ilocans2 years agoFrequent Visitor
Hello
thank you for your answer.
I would like to use this API Datasets - Execute Queries In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn
It does not require any ppu/preemium capacity.
I would like using C# to be able to authenticate with my user credential ( I mean interactive mode with my credentials) to get the necessary token to execute my dax queries. Is it possible in C# ? All I found is using a client ID and client secret but I can't use this method for now. Or any other workaround to execute DAX?
Per exemple, if I test the Try it button on the page, I can authenticate with my user credential and run dax queries witout providing any client id. I would like to do the same in c#.
Regards