cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
r_beacroft
Frequent Visitor

Power BI Desktop - Unable to pull from OData feed using Token authentication

Hi,

 

Am newbie to Power BI.

 

We have an OData feed that supports token authentication.

i.e. requests contain a header with "Authorization Token [guid]"

 

How can I configure Power BI to be able to call ourOData feed?

Is this possible?

 

Kind Regards,

Rik

1 ACCEPTED SOLUTION

Hi @r_beacroft,

If you connect to OData feed using the following entry, and then enter your password, are you able to get desired result?
1.PNG

If not, add a new blank query in Power BI Desktop, then paste one of the following codes in Advanced Editor and check if you get expected result.

let 
Source = OData.Feed("URL", null, [Headers = [Authorization = "Bearer Your token" ] ])
in
Source

 

let    
Source = Web.Contents("URL", [Headers=[#" Authorization  " = "Bearer Your token"]])
in
Source

 

There are a similar thread and blog for your reference.
http://stackoverflow.com/questions/33225590/authenticating-with-excel-power-query-against-net-odata-...
http://angryanalyticsblog.azurewebsites.net/index.php/2016/05/16/api-strategies-with-power-bi/

 

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
r_beacroft
Frequent Visitor

Hi,

 

Am newbie to Power BI.

 

We have an OData feed that supports token authentication.

i.e. requests contain a header with "Authorization Token [guid]"

 

How can I configure Power BI to be able to call ourOData feed?

Is this possible?

 

Kind Regards,

Rik

Hi @r_beacroft,

If you connect to OData feed using the following entry, and then enter your password, are you able to get desired result?
1.PNG

If not, add a new blank query in Power BI Desktop, then paste one of the following codes in Advanced Editor and check if you get expected result.

let 
Source = OData.Feed("URL", null, [Headers = [Authorization = "Bearer Your token" ] ])
in
Source

 

let    
Source = Web.Contents("URL", [Headers=[#" Authorization  " = "Bearer Your token"]])
in
Source

 

There are a similar thread and blog for your reference.
http://stackoverflow.com/questions/33225590/authenticating-with-excel-power-query-against-net-odata-...
http://angryanalyticsblog.azurewebsites.net/index.php/2016/05/16/api-strategies-with-power-bi/

 

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.