Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
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:
I'm not sure if this is a setting. Can anyone help me?
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"
}
Hi @DustineTolete ,
Yes currently SPN don't support for Gateways and the data sources. Thats why you are getting these error
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)
User | Count |
---|---|
8 | |
7 | |
2 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |