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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
jaryszek
Impactful Individual
Impactful Individual

[Power Q] Get CSV from web contents and use headers with authentification for azure portal tenant id

hi Guys,

 

i have url and want to get sent http request with headers with authentification. 
There is CSV document which i want to import into power query.

"f03ea527-ef1111111111111" this is tenantID from azure portal.

First Content is json but i want to get CSV from it.

Tried with:

(Web.Contents("https://local-node.something.com:9999/v1/bundles/Excel/data/something:excel-notderived/1.0.0/ListYes..."), [Headers=[#"Authorization"="Bearer f03ea527-ef1111111111111", #"Content-Type"="application/json"]],[Delimiter=","])

But what i am getting is:

jaryszek_0-1659004035341.png

 


something is missing to convert json into CSV or i am doing this entirely wrong.

Can you please help?
Best,
Jacek

 




1 ACCEPTED SOLUTION
jaryszek
Impactful Individual
Impactful Individual

Ok Guys i didnt inclue "" as and of statement:

AccessTokenVal & ""

Problem solved,
Best,
Jacek

View solution in original post

2 REPLIES 2
jaryszek
Impactful Individual
Impactful Individual

Ok Guys i didnt inclue "" as and of statement:

AccessTokenVal & ""

Problem solved,
Best,
Jacek

jaryszek
Impactful Individual
Impactful Individual

Hi Guys,

i managed to get Access token using method from here:
https://community.powerbi.com/t5/Power-Query/OAuth2-REST-API-as-data-source/td-p/414748 

working fine!

 

so i have variable AccessTokenVal which looks like: 

jaryszek_0-1659015218086.png

 


And now i tried to use Json.Document to get data:
"Json.Document(Web.Contents("https://local-node.something.com:9999/v1/bundles/Excel/data/something:excel-notderived/1.0.0/ListYes..."), [Headers=[#"Content-Type"="application/json",#"Authorization"="Bearer " & AccessTokenVal]])

but error is:

jaryszek_1-1659015247609.png
i found that when body is needed it should be like Json.ToBinary function to make this working.
But i do not have any body, just headers and url within Get method...

 

thank you very much for help,

Jacek

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors