Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
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
Solved! Go to Solution.
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
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())})
The accepted solution didn't work for me (2023), but this did:
1. Open in Edge
2. Zoom out until entire column can be viewed on the page
3. Use the Web Select feature to copy the column into Excel.
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())})
"Change div.user-name to span.user-name"
$('.row').each(
function()
{
console.log($(this).find('span.user-name').text(),",",$(this).find('span.col-emailAddress').text(),",",$(this).find('span.col-permissions').text())
}
)
Hi Bart, thanks for the update and @AlexanderK79 thank you as well!
@Anonymous 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?
@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 🙂
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
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
Nothing happens when I paste the code in the console area.
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.
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!
When I paste this code it doesnt list anything in the console. Where shall I look for it?
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |
User | Count |
---|---|
5 | |
5 | |
4 | |
3 | |
3 |