Forum Discussion
Relation between WorkSpace, DataFlow , Dataset and Report of Power BI
Hi avatorl
I am just a normal Power BI user however running PowerShell with admin account.
Is this could be the issue?
Thanks
Amit
Did you read the documentation of this API function?
https://docs.microsoft.com/en-us/rest/api/power-bi/admin/datasets_getdatasettodataflowslinksingroupasadmin
Note: The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) to call this API or authenticate via service principal.
- amsrivas5 years ago
Helper IV
Hi avatorl
Now i have got data using Admin account but still have some query.
DataFlow->DataSet : To fetch detail, Invoke-PowerBIRestMethod will be used and need to pass workspaceid to it, can understand, if i want to retreive detail of all the dataflow, i need to pass workspaceid one by one, is there any way of writing script whic take all the workspaceid one by one and consolidate detail of all the dataflow into CSV.
$url="https://api.powerbi.com/v1.0/myorg/admin/groups/{groupId}/datasets/upstreamDataflows"
$result = Invoke-PowerBIRestMethod -Url $url -Method GetFor e.g, if i have 10 workspace in organization, i need to pass workspaceid (groupid) again and again and its manual too, Is there any way of writing Powershell script via which i can pass all 10 workspaceid one by one at once programatically.
Workspace -> Dataflow (the way you suggested) : Again, how to write script which can iterate based on workspaceid.
Thanks
Amit
- avatorl5 years ago
Impactful Individual
$Workspaces = Get-PowerBIWorkspace
foreach ($workspace in $Workspaces) {
Write-Host $workspace.id Write-Host $workspace.name
} - amsrivas5 years ago
Helper IV
Hi avatorl Thanks for all your inputs !!!
Any help here would be really appreciable.
1. Relation ship between Workspace and Dataflow
Script Used :
$Workspaces = Get-PowerBIWorkspace
$res = @( foreach ($workspace in $Workspaces) {Get-PowerBIDataFlow -Workspace $workspace }) | Export-Csv -NoTypeInformation -Path C:\Azure\Dataflow.csvResult : Its giving me detail of Dataflow only such Dataflow Id, Dataflow Name etc.
- Will it be possible to include the workspace ID which i have passed above in script in the Output.
2. WorkSpace - Dataset
Script Used : Get-PowerBIDataset
Output - No relationship between Workspace ,dataflow and reports are there.
3. WorkSpace - Report
Script Used : Get-PowerBIReport
This gives relation ship with Dataset, any way to have relation between workspace, dataflow as well.
4. Any scipt that says relation ship between Report to Workspace, Dataflows , dataset , users etc will be great help!!
THanks
Amit