Install-Module -Name MicrosoftPowerBIMgmt -RequiredVersion 1.2.1026
Setup a folder with the Datasets & Reports
Change the Config File with your deployment scenario
Run the Deploy powershell script:
powershell deploy.ps1 -path .\SampleProject -configPath .\config.json
This repo includes a sample project with datasets & reports, if you try to deploy this sample project before running you need to do the following:
- Deploy the dataset to a workspace (you can use the deploy.ps1 script)
- Run the script tool.FixReportConnections.ps1 to ensure local PBIX files target an existent powerbi.com dataset, otherwise you will get an error on report deploy
The main advantage of declaring your deployment environment is that you can easily have multiple deployment configurations (multiple config files) and call the deploy.ps1 using the sample local development files but different deployment config.
Its possible to setup permissions for the workspaces, use the following json
{
"identifier": "[email protected]",
"groupUserAccessRight": "Member",
"principalType": "User"
}
{
"identifier": "[AZURE ID OBJECT ID OF THE GROUP]",
"groupUserAccessRight": "Admin",
"principalType": "Group"
}
{
"identifier": "[AZURE ID OBJECT ID OF THE SERVICE PRINCIPAL]",
"groupUserAccessRight": "Member",
"principalType": "App"
}