migueesc123 / PowerBIRESTAPI

A Microsoft Power BI Data Connector or Power Query Connector for the Power BI REST API
MIT License
237 stars 74 forks source link

Is it possible to add the functionality to get all report users #121

Closed dangaskin closed 2 years ago

dangaskin commented 2 years ago

Hi, firstly thank you for this REST API - it's very useful!

I see someone else mentioned something similar a few weeks ago. Would it be possible to add an enhancement and allow us to retrieve a list of users that have access to individual reports within our workspaces?

I work with a rather large org and as admin I am always asked to check which users have access to which reports etc..

Thanks!

klinejordan commented 2 years ago

Can you provide more specifics for your request? Do you want a query that only returns users for reports in workspaces for which the authenticated user also has access? At the moment there is no Get Report Users In Group REST API available for workspace admins to call for just their workspaces.

Or are you looking for a query that returns every user for every report in the entire tenant? If so, I'll close this as a duplicate of #115

And FYI, You can also always use the GetData function to build your own API call in the absence of a formal query available in the connector.

dangaskin commented 2 years ago

Yes I would like some way of returning every user for every report in the entire tenant. We've applied row level security for each of the reports in our tenant and it would be great to find a way to return a list of users per report.

Do you know of a way of using the GetData function to do this by any chance?

Apologies for the duplicate

klinejordan commented 2 years ago

You can do it using GetData function after calling the Reports as Admin query and looping through each Report ID, but like I mentioned in #115, this is going to be challenging in large tenants given the sheer number of API calls that must be made.

The best place to get this information is the scanner API, which is difficult to incorporate into this connector because it uses a polling mechanism to retrieve results and M is not the best language for doing those kind of operations.

klinejordan commented 2 years ago

Have addressed this with PR #122