Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
We have the following scenario:
1. Semantic Model A
2. Workspace 1 (Tenant 1)
3. Workspace 2 (Tenant 2)
We want to move the semantic model from workspace 1 to workspace 2. As you can see the workspaces are in different tenant (so the option of using Fabric deployment pipelines is excluded).
What we tried is to use Git integration. It works as we change the below connection string in the model.bim file, however when we try to add/remove tables to the semantic model we receive a generic error.
The error is gone if we remove and readd all the tables, but that means all the relationships are gone.
Isn't there a way to avoid this and make the semantic model refresh all the ids under the hood?
Solved! Go to Solution.
Just re-deploy the original pbix file to the other workspace.
Your solution is great 3CloudThomas
Hi, @maxkent
As super user said, you can re-upload your reports to your workspace in different tenants. First of all, you need to have a user with permissions above the contributor role in the different tenant workspace, this can be done by inviting your account as an external user in the different tenant and then granting this permission, you can refer to the following documentation:
Distribute content to external guest users with Microsoft Entra B2B - Power BI | Microsoft Learn
Once you have the permissions, you can deploy your reports to your target workspace via Powershell, here is an example:
First, we need to install the Power shell module:
Install-Module -Name MicrosoftPowerBIMgmt
Use the following command to deploy the master semantic model to multiple workspaces:
Connect-PowerBIServiceAccount
$Path = "C:\Users\xxxx\Desktop\Protest.pbix"
$targetWorkspaceIds = ("xxxx-xxx-xxx-xxx","xxxx-xxx-xxx-xxx","xxxx-xxx-xxx-xxx")
foreach($targetWorkspaceIds in $targetWorkspaceIds){
New-PowerBIReport -Path $Path -Name "Testaaa" -WorkspaceId $targetWorkspaceIds
}
The result returned in PowerShell is as follows:
Check if they are successfully deployed in Power BI:
You can learn about these PowerShell commands from the following link:
https://github.com/Microsoft/powerbi-powershell
You can then update your gateway connection for this semantic model using this API below:
Datasets - Update Datasources - REST API (Power BI Power BI REST APIs) | Microsoft Learn
With the above scenario, you need to have an in-depth knowledge of PowerShell, RestAPI and then practice it.
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Your solution is great 3CloudThomas
Hi, @maxkent
As super user said, you can re-upload your reports to your workspace in different tenants. First of all, you need to have a user with permissions above the contributor role in the different tenant workspace, this can be done by inviting your account as an external user in the different tenant and then granting this permission, you can refer to the following documentation:
Distribute content to external guest users with Microsoft Entra B2B - Power BI | Microsoft Learn
Once you have the permissions, you can deploy your reports to your target workspace via Powershell, here is an example:
First, we need to install the Power shell module:
Install-Module -Name MicrosoftPowerBIMgmt
Use the following command to deploy the master semantic model to multiple workspaces:
Connect-PowerBIServiceAccount
$Path = "C:\Users\xxxx\Desktop\Protest.pbix"
$targetWorkspaceIds = ("xxxx-xxx-xxx-xxx","xxxx-xxx-xxx-xxx","xxxx-xxx-xxx-xxx")
foreach($targetWorkspaceIds in $targetWorkspaceIds){
New-PowerBIReport -Path $Path -Name "Testaaa" -WorkspaceId $targetWorkspaceIds
}
The result returned in PowerShell is as follows:
Check if they are successfully deployed in Power BI:
You can learn about these PowerShell commands from the following link:
https://github.com/Microsoft/powerbi-powershell
You can then update your gateway connection for this semantic model using this API below:
Datasets - Update Datasources - REST API (Power BI Power BI REST APIs) | Microsoft Learn
With the above scenario, you need to have an in-depth knowledge of PowerShell, RestAPI and then practice it.
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Just re-deploy the original pbix file to the other workspace.