cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
olimilo
Post Patron
Post Patron

How to remove "hidden" dataflows in the Service?

Recently found out that I have 2 "hidden" dataflows from our workspace. Is there some way I can get rid of these in the service? The 2 dataflows appear like so in the dataflow selection dialog box in Desktop but are not listed in the dataset page in the Service.

 

olimilo_0-1656033593116.png

 

 

1 ACCEPTED SOLUTION

Thanks Olivier, finally got it to working using this command:

 

 

Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/groups/{workspaceid}/dataflows/{dataflowid}" -Method Delete

 

This requires that the current user is logged in using Login-PowerBIServiceAccount in PowerShell

 

View solution in original post

4 REPLIES 4
otravers
Resident Rockstar
Resident Rockstar

I don't use PowerShell often so I'm not sure. Maybe it's case sensitive, in which case writing "Delete" instead of "DELETE" may work?

https://docs.microsoft.com/en-us/powershell/module/microsoftpowerbimgmt.profile/invoke-powerbirestme...

------------------------------------------------
1. How to get your question answered quickly - good questions get good answers!
2. Learning how to fish > being spoon-fed without active thinking.
3. Please accept as a solution posts that resolve your questions.
------------------------------------------------
More tips and guidance in my Power BI architecture and development blog

Thanks Olivier, finally got it to working using this command:

 

 

Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/groups/{workspaceid}/dataflows/{dataflowid}" -Method Delete

 

This requires that the current user is logged in using Login-PowerBIServiceAccount in PowerShell

 

otravers
Resident Rockstar
Resident Rockstar

I would first get the dataflows definitions via the REST API, and if upon review you know for sure that you want to delete them, again I'd do so using the API:

https://docs.microsoft.com/en-us/rest/api/power-bi/dataflows/delete-dataflow

------------------------------------------------
1. How to get your question answered quickly - good questions get good answers!
2. Learning how to fish > being spoon-fed without active thinking.
3. Please accept as a solution posts that resolve your questions.
------------------------------------------------
More tips and guidance in my Power BI architecture and development blog

Thanks Olivier. I tried the function but I'm running across several errors:

 

Invoke-PowerBIRestMethod DELETE https://api.powerbi.com/v1.0/myorg/groups/{wsid}/dataflows/{dfid}

Returns

Invoke-PowerBIRestMethod : A positional parameter cannot be found that accepts argument 'DELETE'.
At line:1 char:1
+ Invoke-PowerBIRestMethod DELETE https://api.powerbi.com/v1.0/myorg/gr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Invoke-PowerBIRestMethod], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerBI.Commands.Profile.InvokePowerBIRestMetho
   d

While

DELETE : The term 'DELETE' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ DELETE https://api.powerbi.com/v1.0/myorg/groups/3801c78c-8a5a-4b17-9 ...
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (DELETE:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Returns

DELETE : The term 'DELETE' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

 

Any idea where I went wrong?

Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors