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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
GigaGandalf
Frequent Visitor

Creating a Dataset via API with service principal

Hello,

I am trying to create a dataset with the API and have been using a service principal to authenticate my other API calls. Unfortunately it looks like service principal authentication is now allowed for the push semantic model endpoint according to https://learn.microsoft.com/en-us/power-bi/developer/embedded/push-datasets-limitations . Is this correct? As my organization does not allow delegated user access to the power bi API, is there another way to access this API endpoint?

Thanks in advance.

1 ACCEPTED SOLUTION
Deku
Super User
Super User

Are you actually trying to create a push dataset or a normal one? 

 

You can use the Create Item API to create a regular semantic model. The SPN will need contributor access to the target workspace


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

4 REPLIES 4
v-karpurapud
Community Support
Community Support

Hi @GigaGandalf 


Thank you for reaching out to the Microsoft Fabric Community Forum.

Thank you for @Deku for your prompt response.
 

We understand that you're encountering an issue related to creating push datasets using the Power BI REST API. As confirmed by the official Microsoft documentation, service principal authentication is currently not supported for creating push datasets via this API.
 
Since your organization’s restriction on delegated user access, the recommended solution is to utilize the XMLA endpoint within a Power BI Premium workspace. This method allows you to programmatically create and manage datasets using a service principal, fully supporting your security requirements and enabling complex schema definitions.
 

If Power BI Premium is not available in your environment, we suggest considering streaming datasets or dataflows in combination with a manually created dataset as alternative options.
 

For more information, please refer to the official Microsoft Documentation related to XMLA endpoint.

Semantic model connectivity and management with the XMLA endpoint in Power BI - Power BI | Microsoft...

Automate Power BI Premium workspace and semantic model tasks with service principals - Power BI | Mi...

 

If my response has resolved your query, please mark it as the Accepted Solution to assist others. Additionally, a 'Kudos' would be appreciated if you found my response helpful.

Thank You!
 

Hi @v-karpurapud,

thank you for your response. I am aware of the XMLA Endpoint, unfortunately, I am operating in a web context and it is my understanding that the required MSOLAP library for XMLA connectivity is not available for web applications.

Deku
Super User
Super User

Are you actually trying to create a push dataset or a normal one? 

 

You can use the Create Item API to create a regular semantic model. The SPN will need contributor access to the target workspace


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Hi @Deku,

thank you for your response. I was in fact not aware of the fabric API and under the impression that only the powerbi api exists. The create semantic model endpoint covers my needs.

Now I only have to figure out how to create proper semantic model definitions 😄

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.