Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
In order to properly repoint our power bi reports to a newly deployed dataset, we need the PbiServiceModelId value, which appears to be a unique numeric id assigned to a dataset. The public powerbi REST api does not return this value, only the dataset's guid value.
Using various tracing tools, I found I was able to get the PbiServiceModelId values using an undocumented api. In commercial cloud, once I get a valid powerbi context, I can call:
https://wabi-north-europe-redirect.analysis.windows.net/metadata/v201901/gallery/sharedDatasets
and it will return the id values (along with other metadata) for every dataset my user has access to.
Unfortunately, we require this to be part of an automated pipeline. For all of our other pipeline work, we use a service principal to call the REST api. The above rest call does not work with a service principal - it will return the error "API is not accessible for application". It will only work when using an actual Azure account.
So three questions:
1) Is there a different (more acceptable) way to properly repoint our power bi reports to a newly deployed dataset?
2) If not, is there a better way to get the PbiServiceModelId for a dataset?
3) If there is no better way, then is there a way to make the (undocumented) rest call using a service principal account?
As a final note, we need this to work in both commercial and gov cloud. I have the url for the undocumented api for both.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.