cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Exporting list of those with access to the Report

Hi, 

 

I'd like to export the list of those that my report has been shared with. The list has gotten rather long and exporting is the most efficient way. Is there a way to do this? I am already at the list of recipients, I just don't see a way to export.

 

Thanks

2 ACCEPTED SOLUTIONS

Open the Manage permissions page of the dataset  in Chrome, and then start a developer mode using F12

 

in the console area type the following command:

 

$('span.emailColumn').each(function() { console.log ($(this).text())})

 

This will give you all the mail addresses 🙂 in a list

 

or.... even cooler:
$('.permissionTable li').each(function() { console.log ( $(this).children('span.nameColumn').text(),",",$(this).children('span.emailColumn').text(),",",$(this).children('span.memberAccessColumn').text())})

 

Check Bart's updated version of the script since the release of the new sharing experience: https://community.powerbi.com/t5/Report-Server/Exporting-list-of-those-with-access-to-the-Report/m-p...

 

 

which will give you a CSV list in the console to be copy/pasted

 

View solution in original post

Bart_Fleuren
Regular Visitor

Hi @AlexanderK79  , with the new "report sharing experience" MS deployed recently, unfortunately your script doesn't work anymore. I modified it slightly and it works again (see below), BUT I only get back the number of rows that is visible on the browser screen. Would you know any way to get around this?

 

Thanks! Bart

 

$('.row').each(function() { console.log (

$(this).find('div.user-name').text(),",",$(this).find('span.col-emailAddress').text(),",",$(this).find('span.col-permissions').text())})

View solution in original post

29 REPLIES 29
Bart_Fleuren
Regular Visitor

Hi @AlexanderK79  , with the new "report sharing experience" MS deployed recently, unfortunately your script doesn't work anymore. I modified it slightly and it works again (see below), BUT I only get back the number of rows that is visible on the browser screen. Would you know any way to get around this?

 

Thanks! Bart

 

$('.row').each(function() { console.log (

$(this).find('div.user-name').text(),",",$(this).find('span.col-emailAddress').text(),",",$(this).find('span.col-permissions').text())})

View solution in original post

Hi Bart, thanks for the update and @AlexanderK79 thank you as well!

 

@Bart_Fleuren zooming out the page to 50% did the trick for me. I hope MS will come up with an exporting option soon!

 

Best, 

Ayesha

Thanks for updating the script!

Sorry, but I can't help you with that... I don't have a dataset/report that is shared with that many people 😞

 

Too bad MS still does not have a built-in functionality for this... or is it available in the API now?

ashmit_02
New Member

@AlexanderK79 do you have a similar coding for extracting the users assigned to each row-level security role? this would be so helpful to control accesses and manage the security roles. Thank you in advance!

sorry, but I don't have this yet...

but you can probably sort this out using the Chrome developer tools and searching through the page's code 🙂 

stpnet
Impactful Individual
Impactful Individual

You can proably use the REST API to get this using some PowerShell.

 

You can of course query the backend database (ReportServer DB) if you have access with something like this

 

All our security is applied at a folder level (hence the Type=1) if its an indivuidual report you would need to figure out how to query for that within the dbo.catalog table.

 

SELECT	u.UserName
	   ,r.RoleName
FROM	dbo.PolicyUserRole pur
		LEFT OUTER JOIN dbo.Roles r
			ON r.RoleID = pur.RoleID
		LEFT OUTER JOIN dbo.Users u
			ON u.UserID = pur.UserID
WHERE	pur.PolicyID = (
						 SELECT	PolicyID
						 FROM	dbo.Catalog
						 WHERE	Type = 1
								AND Path = '<PATH_TO_FOLDER>' );

from where i can get the access of the db

stpnet
Impactful Individual
Impactful Individual

When you install PBI Reporting Server it has to be setup with a database backend. You can see where this is by running the PBI Reporting Server config tool on your PBI Reporting server. You will need permissions to go query that server and DB.

 

 

Open the Manage permissions page of the dataset  in Chrome, and then start a developer mode using F12

 

in the console area type the following command:

 

$('span.emailColumn').each(function() { console.log ($(this).text())})

 

This will give you all the mail addresses 🙂 in a list

 

or.... even cooler:
$('.permissionTable li').each(function() { console.log ( $(this).children('span.nameColumn').text(),",",$(this).children('span.emailColumn').text(),",",$(this).children('span.memberAccessColumn').text())})

 

Check Bart's updated version of the script since the release of the new sharing experience: https://community.powerbi.com/t5/Report-Server/Exporting-list-of-those-with-access-to-the-Report/m-p...

 

 

which will give you a CSV list in the console to be copy/pasted

 

View solution in original post

Thanks Alex, the list appear in console but i didnt get the csv .. how do we get the csv?

"which will give you a CSV list in the console to be copy/pasted" 😊

😛 ok fair enough.... this script is genius

Great solution! Worked perfectly!

Hi, Can it be that something changed on the site? It is not working for me. 

LinVPowerBI1_0-1612970933440.png

Thanks in advance!

Hi there,

just tried it and it still works for me.... did you open the Manage permissions page of the dataset first? The URL that starts with https://app.powerbi.com/groups/me/permission/report 

Yes it worked, I was looking at the pop-up screen. Great thanks!

Hi, i tried the solution suggested by you and it worked very perfectly. I just would want to tweek some parameters like instead of Email i want Alias. How should i do that? From where i can get more references to make more combinations?

 

Many Thanks,

no, I'm sorry... you can only retrieve what shows up in the permissions list...

 

have you tried:

 

$('.permissionTable li').each(function() { console.log ( $(this).children('span.nameColumn').text(),",",$(this).children('span.emailColumn').text(),",",$(this).children('span.memberAccessColumn').text())})

This is great!!! thank you! do you have a similar coding for extracting the users assigned to each row-level security role? this would be so helpful to control accesses and manage the security roles. Thank you in advance!

Hi, I have a similar kind of requirment to export list of users assigned in different roles..any update on this

Thanks in advance!

 

 

 

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Urdu Hindi D365 Bootcamp 768x460.png

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.