cancel
Showing results for 
Search instead for 
Did you mean: 

PbiServiceModelId

As an ISV building solutions on top of Microsofts business platforms, our organization needs to have a well defined approach to deploy Power BI Reports and Datasets that can be part of our continuous delivery systems within Azure DevOps delivery pipelines.
 

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.

Status: New
Comments
Community Support

hi  @psyang 

You may try these way to get PbiServiceModelId 

 

a. Create another PowerBI report referencing the dataset you want the ID of, save it, extract it, and look in the Connections file

b. Use the PowerBI REST API (eg. Get Dataset By ID in Group in my case) - note that this requires authentication, as your browser isn't authenticated on api.powerbi.com

c. Using Chrome or any other developer-friendly browser, open the report list, the Developer Tools, and look in the network responses (in particular, a response from https://*.analysis.windows.net/powerbi/metadata/app), and check the models property for a list of your available datasets in your current workspace.

 

 

and to get faster and better technical support for this issue, you may directly create a support ticket.

 

Regards,

Lin

Frequent Visitor

I can confirm that a) and c) work, but is not useful in an automated pipeline environment.

I can confirm that b) does not work. The PowerBI REST api does not return the model id. In fact, the Get Dataset By ID in Group does not exist, only "Get Dataset In Group", which only returns the group guid, not the model id.

 

I have logged a call with Microsoft, but so far their official response ranges from "probably not" to "no" to my three questions.