Forum Discussion
Disable Sharing Form Personal Workspace
- 4 years ago
Anonymous To the best of my knowledge that setting does not exist.
- 4 years ago
Hi, Anonymous
As far as I know there is no such setting, disabling re-share permissions for reports, using row-level security for roles, and publishing an app to specific users might be workarounds.
refer:
Introduction to Workspace in Power BI, Assign Roles and Permission
Row-level security (RLS) with Power BI
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, we're thinking of utilizing your method in our organization as well. Could you elaborate on the PowerShell script that you used? was it just get\set-powerbiworkspace? I tried it myself but I'm not a tenant admin and wasn't able to see "my workspace" just the other workspaces I have access to.
Here's the sample for those looking to implement this:
- Gather all personal workspaces to disable and store it as a variable with IDs
- Batch it up
- Start the capacity
- Run AssignWorkpsaces API to bulk move them into this new ASKU (replace it with your Object ID)
- Pause the capacity
$Personal_WS = Get-PowerBIWorkspace -All -Scope Organization -Include All | Where-object { ($_.State -eq "Active") -and ($_.Type -eq "PersonalGroup") -and ($_.Description -ne "SharepointList Folder") -and ($_.isOnDedicatedCapacity -ne "true") } | Select-Object id
$ToBeDisabled=@()
$guid = $Personal_WS |ForEach-Object {$_.Id}
$ToBeDisabled = @($guid) + $ToBeDisabled
# If you have more than 500, you can use to batch it about 500 each time and loop thru the list
$size = 500
$bins = [Math]::Ceiling($ToBeDisabled.count / $size )
for ($s = 0; $s -le $bins; $s++) {
$skip = $size * $s
$ToBeDisabled_Batch = $ToBeDisabled | Select-Object -First $size -Skip $skip
$workspaceIds = @($ToBeDisabled_Batch.id )
$body = @{
capacityMigrationAssignments = @(@{
#targetCapacityObjectId = $targetCapacity.Id;
targetCapacityObjectId = "YOUR-ASKU-CAPACITY-OBJECT-ID";
workspacesToAssign = $workspaceIds
})
}
$bodyStr = ConvertTo-Json $body -Depth 3
Try {
Invoke-PowerBIRestMethod -Url 'admin/capacities/AssignWorkspaces' -Method Post -body $bodyStr
write-host "$(Get-TimeStamp) $($ToBeDisabled_Batch.count) Workspaces assigned to capacity (DISABLED): '$($targetCapacity.DisplayName)' " -ForegroundColor Green
}
Catch {
write-host "$(Get-TimeStamp) Failed to disable or assign to Embedded A-SKU " -ForegroundColor Red
}
}
write-host "$(Get-TimeStamp) Disabled all $($ToBeDisabled.count) new Personal Workspaces !!" -ForegroundColor Green
Hope this helps others!