-
Notifications
You must be signed in to change notification settings - Fork 436
Description
I am using following script to create 2 workspaces and publish the semantic model and report to the 2 different workspaces.
$mdlworkspaceId = New-FabricWorkspace -name "TestPBIPModelWorkSpace" -skipErrorIfExists
$rptworkspaceId = New-FabricWorkspace -name "TestPBIPReportWorkSpace" -skipErrorIfExists
$currentPath = (Split-Path $MyInvocation.MyCommand.Definition -Parent)
$pbipSemanticModelPath = "$currentPath\TestPBIP.SemanticModel"
$pbipReportPath = "$currentPath\TestPBIP.Report"
Set-FabricAuthToken -reset
$semanticModelImport = Import-FabricItem -workspaceId $mdlworkspaceId -path $pbipSemanticModelPath
$reportImport = Import-FabricItem -workspaceId $rptworkspaceId -path $pbipReportPath -itemProperties @{"semanticModelId" = $semanticModelImport.Id }
After succesfully running above script.. i granted myself read,build,share for the semantic model and changed role to "Viewer" on workspace "TestPBIPModelWorkSpace".
If i now try to publish the report it errors out... (update of report)
If i delete the report and deploy report.. it works fine again. (creation of report)
Import-FabricItem -workspaceId $rptworkspaceId -path $pbipReportPath -itemProperties @{"semanticModelId" = $semanticModelImport.Id }
For updating a report looks like fabric APIs warrant write privileges on the semantic model/workspace.
Pls advise if any workaround for same.
Thanks,
Naren