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
misaqoo_29
Regular Visitor

Failed to update data source credentials - API call request

Hey Everyone,

 

I've tried my best to look up for a solution (same error was posted in https://www.pbiusergroup.com/communities/community-home/digestviewer/viewthread?MessageKey=7da6b52f-... but no answers at the end) to the below error on Power BI Service

 

misaqoo_29_2-1678671210122.png

 

 

I am currently running the query below to obtain an access token and utilize it on another URL to authorize and obtain the result I need.

 

 

let

GetJson = Web.Contents("https://login.***",
[
Headers = [#"Accept"="application/json",
#"Content-Type"="application/x-www-form-urlencoded;charset=UTF-8"],
Content = Text.ToBinary("grant_type=client_credentials&client_id=***&client_secret=***"),
RelativePath = "/realms/***/protocol/openid-connect/token"
]
),
FormatAsJson = Json.Document(GetJson),
#"Converted to Table" = Record.ToTable(FormatAsJson),
access_token = #"Converted to Table"{0}[Value],

source = Web.Contents("https://client-api.***/checklist-templates", [Headers=[Authorization="Bearer "&access_token,ContentType="application/json"]]),
Result = Json.Document(source),
#"Converted to Table2" = Record.ToTable(Result),
#"Expanded Value" = Table.ExpandListColumn(#"Converted to Table2", "Value"),
#"Expanded Value1" = Table.ExpandRecordColumn(#"Expanded Value", "Value", {"id", "name", "versions"}, {"id", "name.1", "versions"})
in
#"Expanded Value1"

 

 

and below are the two data source credentials that are generated from publishing the report

 

1. misaqoo_29_0-1678671039108.png

 

 

 

 

2. misaqoo_29_1-1678671084141.png

 

 

 

 

What am I doing wrong that PBI Service refuses to connect to the data source?

 

Cheers

0 REPLIES 0

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