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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
gabriel-mendes
Regular Visitor

How to Create a Data Source in Power BI Embedded for a Service Principal Profile

Hi all

 

I am in the setup process for the App-Owns-Data Architecture with Service Principal Profiles. 

I have created a Service Principal --> Profile --> Workspace --> Assigned a Capacity for the Workspace

 

Now I want to use this API to set up a data source for this workspace / service principal profile with this API:

https://learn.microsoft.com/en-us/rest/api/power-bi/gateways/create-datasource

 

Unfortunately, I don't know what a gateway is that I need to add.
I want to connect to a self hosted postgres DB. The postgres DB is externally reachable. Do I need a gateway?

Would appreciate any help. 

Many thanks

 

2 ACCEPTED SOLUTIONS
collinq
Super User
Super User

HI @gabriel-mendes ,

 

If your data truly is cloud, then you should not need a gateway.  But, if you are worried about permissions being set for users to create reports then you can create a Data Source with a Service Account or other userid that won't change and then grant your report writers access to use that Data Source.

In looking at the API's I do not see the ability to just create a Data Source that is not using a Gateway.  So, you may have to have the Data Source created manually.




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




View solution in original post

SaiTejaTalasila
Super User
Super User

Hi @gabriel-mendes ,

 

You need a data gateway connection.You can use on-premises data gateway app on your machine or you can contact your tenant admin  they will be able to configure a on-premises data gateway connection incase if they any gateway clusters.

 

You can refer this for more details -

https://powerbidocs.com/2021/02/22/personal-vs-on-premises-data-gateway-standard/

View solution in original post

2 REPLIES 2
SaiTejaTalasila
Super User
Super User

Hi @gabriel-mendes ,

 

You need a data gateway connection.You can use on-premises data gateway app on your machine or you can contact your tenant admin  they will be able to configure a on-premises data gateway connection incase if they any gateway clusters.

 

You can refer this for more details -

https://powerbidocs.com/2021/02/22/personal-vs-on-premises-data-gateway-standard/

collinq
Super User
Super User

HI @gabriel-mendes ,

 

If your data truly is cloud, then you should not need a gateway.  But, if you are worried about permissions being set for users to create reports then you can create a Data Source with a Service Account or other userid that won't change and then grant your report writers access to use that Data Source.

In looking at the API's I do not see the ability to just create a Data Source that is not using a Gateway.  So, you may have to have the Data Source created manually.




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors