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.

Power BI Scanner API

Hi,

 

I'm trying to fetch metadata from all my workspaces using 'scanResult' API.

API Link: https://docs.microsoft.com/en-us/rest/api/power-bi/admin/workspace-info-get-scan-result


I'm able to get tables and measures information of some of my reports and the rest are giving me empty result.

Can someone please help me troubleshoot this?


Status: Investigating

Hi,

According to my research, the rest API GetScanResult has the limitation of Maximum of 500 requests per hour. I think you should check if you have not met the maximum restriction of the rest API and you have the tenant admin role that has the read/write access to all the workspace within the tenant.

 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

Comments
v-robertq-msft
Community Support
Status changed to: Investigating

Hi,

According to my research, the rest API GetScanResult has the limitation of Maximum of 500 requests per hour. I think you should check if you have not met the maximum restriction of the rest API and you have the tenant admin role that has the read/write access to all the workspace within the tenant.

 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

Krishanu
Helper I

Ditto! I have Power BI Admin permission and I am just testing a few workspaces using the try-it feature in website (so limit on api calls couldnt be the problem), still same issue. The Table block is coming as empty.
I have Admin permission in the workspace level also.

Krishanu_0-1641218372723.png

 

Anonymous
Not applicable

@v-robertq-msft Is there an update on this ? 

When the tables are blank, everything lower in the json hierachy to the table is absent- so for example the M-Code that loads the table.

 

I am currently working on a large database migration project where we need to repoint several  thousand Power BI reports from a legacy database to a cloud database. We were hoping to use the connection string in the M-Code to identify Power BI reports that need to be migrated. But after examining the json files from Scanner API ,  66%  our datasets don't have table data /metadata.

 

As a part of my investigation, I looked at how many datasets had no Table information i.e  "tables": [] appearing in the json file. The proportion of datasets with no tables appearing is decreasing relative to the dataset creation date (see below).  One hypothesis I had was this was linked to the release of the Enhanced Metadata engine and how mashup data is stored in a PBIX file. 

 

Happy to provide specific examples (json files etc.) -  if that helps. 

 

It would be really valuable to get to the bottom of this issue.

Regards

Steve

 

Empty tables.JPG

Anonymous
Not applicable

@v-robertq-msft Re your suggestion on checking  Admin permissions & 500 calls per hour limit. I don't believe either are the problem.

 

Re the Admin permissions- if we didn't have the correct permissions, the call would be refused by the server. We do have the right permissions, and do get valid json files back.

Re the 500 request limit. 

1) 500 GetScanResult requests, allows you to retrieve metadata on 50,000 workspaces (as each "scanresult"  is for a chunk of 100 workspaces). We only have 10K workspaces. So in our case, we don't get near the rate limit.

 

2) If we did exceed the 500 requests limit, we should get a  "API rate limit is exceeded" type error (429 error). I don't get this, 

 

3) We are getting valid json back, it is just that some datasets are missing Table information, when the dataset definitely has tables.  See two examples below- One dataset has table information, one doesn't. empty Table.JPGTable right.JPG

Anonymous
Not applicable

OK - more research. It would appear that this low level metadata relating to datasets is only generated/available  for datasets that are refreshed or republished. Will cross check the absence of Table & column  metadata /M-Code etc, against the presence of refreshes. https://docs.microsoft.com/en-us/power-bi/enterprise/service-admin-metadata-scanningTables.JPG