PowerShell to grant access to a Power BI Workspace


This short script will help you get access to a Power BI workspace. All you need is the user's email address, and the ID of the workspace which you can get from the URL. The last two lines get information about the Workspace, and confirm that you granted access to the user.

Import-Module -Name MicrosoftPowerBIMgmt
$workspaceID = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
$email = "person@contoso.com"
Add-PowerBIWorkspaceUser -Scope Organization -Id $workspaceID -UserEmailAddress $email -AccessRight Member
Get-PowerBIWorkspace -Id $workspaceID
Invoke-PowerBIRestMethod -Url "groups/$workspaceID/users" -Method Get 
Share on Google Plus

About Tom DeMeulenaere

Highly accomplished information technology professional with extensive knowledge in System Center Configuration Manager, Windows Server, SharePoint, and Office 365.
    Blogger Comment


Post a Comment

Note: Only a member of this blog may post a comment.