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
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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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