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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
krish11
Frequent Visitor

PowerShell - I want to get Power Bi data sources from PowerShell Script- Using Azure cloud Runbook

I am using Powersehll in Azure run book with Service principal account to connect PowerBI. However, I am unable to fetch the datasource with the help of Report ID.

 

I've tried the below API to get the datasources based on the reportid but powershell encountered an error.

GET https://api.powerbi.com/v1.0/myorg/reports/{reportId}/datasources

 

Source Code example.

/*

$wreContainer = Invoke-PowerBIRestMethod -Url $url -Method Get | ConvertFrom-Json
$wreContainer 
*/
 
I am getting below error when I ran this code. Not able to find what it is trying to say.

 

krish11_0-1623863232648.png

 

I really appreciate your help. Please please help me. Thank You in Advance...
1 REPLY 1
v-easonf-msft
Community Support
Community Support

Hi, @krish11 

Can you provide more error information?

You can also open a support ticket to let engineers look into the issue on your side.

https://powerbi.microsoft.com/en-us/support/pro/ 

 

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors