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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
DustineTolete
Frequent Visitor

DMTS_DatasourceAccessRightIsNotSupportedError when trying to grant SPN account access to gateway

Hello. I am getting an issue when trying to grant an SPN account access to a gateway. I am creating a request using the PowerBI Rest API, as we can't explicitly grant an SPN account access to a gateway. I am following these steps on granting the SPN gateway access. Other than that, I don't see anything that is related to this. 

 

When I am running the request, I am getting this error: 

 

gdas.gif

 

I'm not sure if this is a setting. Can anyone help me? 

3 REPLIES 3
Anonymous
Not applicable

Hi @DustineTolete ,

Regarding your problem - after making an update of Gateway to the newest October 2019 (Release 2) version and completing the request with additional attribute "principalType": "App" I was able to successfully POST the request with ServicePrincipal:

 

{
"identifier": "<your SPN Id>",
"datasourceAccessRight": "ReadOverrideEffectiveIdentity",
"principalType": "App"
}

Jayendran
Solution Sage
Solution Sage

Hi @DustineTolete ,

 

Yes currently SPN don't support for Gateways and the data sources. Thats why you are getting these error

 

Capture.JPG

Anonymous
Not applicable

So it's impossible to let a Service Principal manage a gateway (have read/write access)? When I read this I thought it'd be possible: https://github.com/MicrosoftDocs/powerbi-docs/issues/1067

 

What I want to achieve is be able to change a  datasource in a dataset, that's connected through a gateway, using the .net nuget package and the Service Principal, I hope this makes some sence

 

Edit: Also this example shows, pretty clearly according to me, that it should work https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/adddatasourceuser#example-for-giving-rea...

 

Edit 2: Noticed my user, the user i'm using to add the SP to the dataset, only have Read access. Tried chaning it to ReadOverrideEffectiveIdentity but I get the same error as before (same as Original poster got)

Helpful resources

Announcements
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.