Forum Discussion
Is it possible to tell which reports are using dataflows?
For some reason, I have been unable to use that API call to retrieve the data sources.
Let me explain. We have a power shell routine that downloads various fabric tenant activities/objects each day and then populate an on premise database. That way we build up a history of our tenant.
So for example I have been trying some scripts today.
The following script runs successfully and returns data:-
$rJSon = Invoke-PowerBIRestMethod -Url 'admin/Groups/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx6f7/datasets' -Method Get
$rJSon
However, the following script returns an error saying "dataset {guid} is not found
$xJSon = Invoke-PowerBIRestMethod -Url 'groups/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx6f7/datasets/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx306/datasources' -Method Get
$xJSon
I am somewhat confused, as I am supplying the same work group guid, that is successful in my first snippet above. Also, the dataset guid is also correct because I can see it either in my database or in the Json.
I am aware that the second API call does not start with "admin".
Do I need a different module for retrieving the data sources? Any advice?
Thanks
Hi, Dragon496
1.Firstly, based on your error message, we cannot rule out the possibility that there is an issue with your datasetId.
You can try opening the semantic model you need in the service and checking its URL:
The part highlighted in red above is the datasetId.
2.Secondly, ensure you are logged in within PowerShell:
Continue with your attempt. Below is a screenshot from my test:
Of course, if you have any new discoveries or questions, please feel free to get in touch with us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.