cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lazdaa
New Member

Power BI Rest API - Unauthorized only for GetDatasources

Hi all,

 

Yesterday I was trying to setup a flow that would export datasets and datasources from those datasets from our Power BI reports. 

We've already setup a Custom connector for PBI Rest API that is working just fine, some items use regular PBI accounts and others use the ADM accounts.

 

The problem I am facing is that whenever I try to test the GetDatasourcesAsAdmin call, I get an unauthorized message. Which is weird because firstly, it works in documentation page (Admin - Datasets GetDatasourcesAsAdmin - REST API (Power BI Power BI REST APIs) | Microsoft Docs) but also because the other Admin commands works just fine - for example the GetDatasetsasAdmin which I'm running prior to this is working fine. It is just this action that is not working correctly. 

Lazdaa_0-1632468419660.png

 

The returned headers:

Spoiler
{
"cache-control": "no-store, must-revalidate, no-cache, proxy-revalidate",
"content-type": "application/octet-stream",
"date": "Fri, 24 Sep 2021 07:26:24 GMT",
"home-cluster-uri": "https://wabi-north-europe-g-primary-redirect.analysis.windows.net/",
"pragma": "no-cache",
"request-redirected": "true",
"requestid": "eb8f9066-70d6-4ff8-abfc-a70e516caf3a",
"strict-transport-security": "max-age=31536000; includeSubDomains",
"transfer-encoding": "chunked",
"x-content-type-options": "nosniff",
"x-frame-options": "deny",
"x-ms-apihub-cached-response": "true"
}

As far as I can tell it should be setup correctly and similarly to the other call which are working just fine.

Lazdaa_1-1632468560967.png

 

Lazdaa_2-1632468587441.png

 

I've already tried removing it and adding it again - updating the connector but without any luck.

 

Any ideas?

 

 

1 REPLY 1
Lazdaa
New Member

Bump 

Anyone able to help out with this? Still haven't found a solution...

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (837)