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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
dkinlnd
Regular Visitor

401 Unauthorized adding a user to a datasource

Trying to use the Add Datasource User operation (https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/adddatasourceuser)

 

I am an owner of the data gateway in question, and I can read the gateway info and datasources fine using the API, but when I try to add a service principal to a datasource I get a 401 error (with no additional detail in the response).

 

Are there any special permissions required for adding a user to a datasource?

1 REPLY 1
lbendlin
Super User
Super User

The documentation only mentions users and email enabled security groups.  Service principals are not mentioned.

 

https://docs.microsoft.com/en-us/power-bi/connect-data/service-gateway-data-sources#manage-users

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.