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

27 REPLIES 27
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!

Thank you @AlexanderK79 , worked perfectly

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!