Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

0

Export-PowerBIDataflow errors: Operation returned an invalid status : code 'Unauthorized'

Hello 

 

I am trying to extract data from my reporting online with powershell

 

I am doing 

 

Connect-PowerBIServiceAccount

 

==> fine receiving acces OK

 

then I am asking my dataset 

Get-PowerBIDataset

 

well I am receiving 3 id :

I am taking the first :

hervekoap_0-1644961669239.png

then I am doing 

hervekoap_1-1644961765036.png

 

 

I can imagine that I have enough right on my own workspace! Isn't it?

 

Status: Delivered

Hi @hervekoap 

 

Please run the following command to get the dataflow id but not the dataset id after you sign in to Power BI service with ‘Connect-PowerBIServiceAccount’.

Get-PowerBIDataflow -Scope Organization

 

After that, run the command of exporting dataflow.

Export-PowerBIDataflow -Id [dataflow id] -Scope Organization -OutFile tt.txt

 

For more details about these two cmdlets, please refer to Get-PowerBIDataflow (MicrosoftPowerBIMgmt.Data) | Microsoft Docs and Export-PowerBIDataflow (MicrosoftPowerBIMgmt.Data) | Microsoft Docs.

 

Best Regards,

Community Support Team _ Caiyun

Comments
v-cazheng-msft
Community Support
Status changed to: Delivered

Hi @hervekoap 

 

Please run the following command to get the dataflow id but not the dataset id after you sign in to Power BI service with ‘Connect-PowerBIServiceAccount’.

Get-PowerBIDataflow -Scope Organization

 

After that, run the command of exporting dataflow.

Export-PowerBIDataflow -Id [dataflow id] -Scope Organization -OutFile tt.txt

 

For more details about these two cmdlets, please refer to Get-PowerBIDataflow (MicrosoftPowerBIMgmt.Data) | Microsoft Docs and Export-PowerBIDataflow (MicrosoftPowerBIMgmt.Data) | Microsoft Docs.

 

Best Regards,

Community Support Team _ Caiyun

hervekoap
Regular Visitor

Hy Caiyun 

 

thansk for your help indeed I create a dataflow and it works 

 

but the  Export-PowerBIDataflow  exports the definition of the dataflow where I added only one table

 

I would like to have the data included in the dataflow . 

Is it possible???

 

definition received:

{"name":"test1_luware","description":"","version":"1.0","culture":"en-US","modifiedTime":"2022-02-16T10:30:30.6217584+00:00","pbi:mashup":{"fastCombine":false,"allowNativeQueries":false,"queriesMetadata":{"T":{"queryId":"7599b4e9-a9dc-4eb5-9ee8-1b02d27894f7","queryName":"T","loadEnabled":true}},"document":"section Section1;\r\nshared T = let\r\n Source = Sql.Database(\"sdb_dwh_acc\", \"TEST_LUWARE\"),\r\n Navigation = Source{[Schema = \"dbo\", Item = \"T\"]}[Data]\r\nin\r\n Navigation;\r\n"},"annotations":[{"name":"pbi:QueryGroups","value":"[]"}],"entities":[{"$type":"LocalEntity","name":"T","description":"","pbi:refreshPolicy":{"$type":"FullRefreshPolicy","location":"T.csv"},"attributes":[{"name":"a","dataType":"string"}]}]}T

 

but NO DATA !!!