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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

How to connect to an OData source using a token

Hi all,

 

I need to pass a token to access an external OData api - how can this be achieved? 

 

Thanks!

Keith. 

2 REPLIES 2
dax
Community Support
Community Support

Hi @Anonymous , 

You could use token in Basic authentiocation, you could refer to odata-with-power-bi  for details. Or you also could try below M code(use anonymous) to see whether it work or not

let 
Source = OData.Feed("myOdataURL", null, [Headers = [Authorization = "My token" ] ])
in
Source

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi Zoe,

 

Thanks for your reply. Using basic just didn't work.  Tried PowerQuery using your suggested solution ...  = OData.Feed("https://localhost:44399/odata/", null, [Headers = [Authorization = "bearer xxxxxxxxx" ] ]) No luck at all I just get a "Edit Credentials" dialog 😞

 

Nothing wrong on the api side - as all is working fine through Postman. All works ok in PowerBI too once I temporarily disable auth on the api.

 

Thanks, Keith. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.