Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Powershell + Who has access

Hi,
I am trying to export all accessrights for our organization for Power BI.

Workspace accessRight I can see I can get with powershell and Get-PowerBIWorkspace -Scope Organization
but how do I get accessrights for

- Datasets

- Reports 

- Apps


I have looked at 
Get-PowerBIDataset -Scope Organization
Get-PowerBIReport
but it looks like the accessrights is not included there.

 

1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hi. I think there might be something at the cmdlets docs that can help you. I'm assuming the methods might be using the Rest API. The Admin API shows that you can "expand" the workspaces by things like datasets. Check the api doc https://learn.microsoft.com/en-us/rest/api/power-bi/admin/groups-get-groups-as-admin

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

View solution in original post

6 REPLIES 6
ibarrau
Super User
Super User

Hi. I think there might be something at the cmdlets docs that can help you. I'm assuming the methods might be using the Rest API. The Admin API shows that you can "expand" the workspaces by things like datasets. Check the api doc https://learn.microsoft.com/en-us/rest/api/power-bi/admin/groups-get-groups-as-admin

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Hello,

 

Did you find a solution? I have the same problem to have the information about datasets, dataflows...

 

Thanks for the information.

 

Kind regards,

Anonymous
Not applicable

I exported the data with this code and have built a report on the output it in Power Bi.

 

param(
# Output path
[string] $BasePath = "C:\_PowerBIService_Exports\"
)

Clear-Host
Write-Host("Loading Apps.....Start")

$filedate = $(Get-Date).toString("yyyyMMdd_HHmmss")
$AppssourcesPath = $BasePath + "Apps\Apps_Output\" + $($filedate.Substring(0,8)) + "_Apps.json"
$URL_APPS = "admin/apps?%24top=5000"

# -------------------------------------------------------------------------
# Start
# -------------------------------------------------------------------------

$Result_Apps = Invoke-PowerBIRestMethod -Url $URL_APPS -Method Get

# Print output to file
$Result_Apps | Out-File $AppssourcesPath

#Convert from Json
$Result_Apps = $Result_Apps | ConvertFrom-Json

$counter = 0
# Loop apps
foreach($rec_apps in $Result_Apps.value)
{
Write-Host $rec_apps.id + $rec_apps.name

$lv_appId = $rec_apps.id
$URL_APP_ACCESS = "admin/apps/$lv_appId/users"
$Result_App_Access = Invoke-PowerBIRestMethod -Url $URL_APP_ACCESS -Method GET

$AppAccessSourcesPath = $BasePath + "Apps\AccessPerApp_Output\" + $($rec_apps.id) + "_Access.json"

#Output - One file per app
$Result_App_Access | Out-File $AppAccessSourcesPath

# Count number of apps
$counter = $counter + 1
}

Write-Host "Loading .....Done. Number of apps: $($counter)"

This code is only for apps right? Could we obtain the same information for datasets and dataflows?

 

Kind regards,

José

Anonymous
Not applicable

I can't find anything related to access on app, dataset and report.
Do you have any examples for that?

Anonymous
Not applicable

Looks like this one can work for apps, I will test that tomorrow.
GET https://api.powerbi.com/v1.0/myorg/admin/apps/f089354e-8366-4e18-aea3-4cb4a3a50b48/users

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors