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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
victorF
Regular Visitor

TDA API Access Request OAuth 2.0 Excel Data Query

Hello,

Anyone knows how to perform the OAuth2.0 Authentication using the Power Query for TD Ameritrade.

I am able to make API call using the Power Query, but i need to manually enter the 30min access token.

Trrying to creat a power Query request to perfom the OAuth2.0. Once received the 30min Access token, use it as a function to perfom API requestes.

1 ACCEPTED SOLUTION
victorF
Regular Visitor
3 REPLIES 3
victorF
Regular Visitor

v-yingjl
Community Support
Community Support

Hi @victorF ,

If want to connect from Power BI to a REST API that uses OAuth2 authentication then you need to build a custom connector. You can find documentation on how to implement an OAuth2 flow in a custom connector here.

 

Refer this blog: Connecting To REST APIs With OAuth2 Authentication In Power Query/Power BI 

 

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

Hey @v-yingjl 

 

I have been trying to build the custom connector, its quite compluicated as i am not so familar with M code.
I have the cURL for the POST request. Sucessfully tested in Postman.

Postman alows to convert the cURL in many languages but not in to M code.

Are you aware of any tool to convert any code language in to M code?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.