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.
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
@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.
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.
@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.
OK... Now we need another solution for the topic.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
18 | |
17 | |
16 | |
9 |