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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Getting the list of Workspace users and their access type into a Power BI report

HI community,

I want to get the list of one of our Workspace users and their access types in Power BI service. If there is such a data available I would like to connect a power BI to that data and create a report for it. Can you guide me on how to get access to such data?

 

Best regards

6 REPLIES 6
devesh_gupta
Super User
Super User

@Anonymous 

Power BI does not have a direct built-in feature to retrieve a list of users and their access types in a workspace from within the Power BI Service. However, you can achieve this by using Power BI PowerShell cmdlets to interact with the Power BI Service programmatically.

You might approach like this:

1. Install and Set Up Power BI PowerShell:
- Install the Power BI Management module by running the following PowerShell command:

Install-Module -Name MicrosoftPowerBIMgmt

2. Connect to Power BI Service:
- Use the `Connect-PowerBIServiceAccount` cmdlet to sign in to your Power BI Service account.

3. Get Workspace Users and Their Access Types:
- Use PowerShell cmdlets or the REST API to retrieve a list of users and their access types for a specific workspace. You can use cmdlets like `Get-PowerBIWorkspace` and `Get-PowerBIWorkspaceUser`.

For example, you might use PowerShell code like this:

$workspaceId = "YourWorkspaceId"
$users = Get-PowerBIWorkspaceUser -WorkspaceId $workspaceId

4. Load Data into Power BI:
- Once you have the data in PowerShell, you can export it to a CSV file or connect Power BI directly to the PowerShell session.

 

If this helps you, please mark it as an accepted solution to help other users find it more easily.

Anonymous
Not applicable

Hi @devesh_gupta ,

Thank you very much for the detailed answer. Just one final question: You mentioned that it is possible to connect the data in PowerShell directly into Power BI... How can I do that?

@Anonymous You can follow this article for the step-by-step process for loading the data from power shell to power bi: How to Push Data via PowerShell to PowerBI - Petri IT Knowledgebase

If you find this insightful, please provide a Kudo and accept the previous detailed answer as a solution so that other users can find it more easily.

Anonymous
Not applicable

@devesh_gupta It does not understand the command of Get - PowerBIWorkspaceUser:

$users = Get-PowerBIWorkspaceUser -WorkspaceId $workspaceId

  

What am I missing?

@Anonymous Yeah, you're right actually "MicrosoftPowerBIMgmt" module doesn't have this “Get-PowerBIWorkspaceUser” cmdlet. It has these cmdlets only as mentioned below in the screenshot from official microsoft documentation.

devesh_gupta_0-1697542353686.png

Anonymous
Not applicable

OK... Now we need another solution for the topic. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors