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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
DarylCox
New Member

Connecting to API help

Good morning everyone.

 

new user of Power BI here.

 

I have started a new job and am looking to connect to their full suite of API's so i can create some dashboards.

 

i can access the API's already using Postman but am struggling on what i need to do within Power BI to get the data.

 

Essentially there is an identity server where i first have to get a bearer token in order to access the API

 

i have tried using the Web method for get data and adding the URL but it errors with authorisation

 

i have looked at using the advanced editor when using the blank query but again unsure how to add the access credentials in

 

can anyone offer some wisdom

 

thanks

 

Daryl

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@DarylCox , refer if this can help

https://www.advaiya.com/generate-dynamic-token-and-get-data-from-custom-api-in-power-bi/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
DarylCox
New Member

So cant seem to get the second part working to automatically refresh the token each time.

i have followed the steps in the link but i get an error.

this is the query

DarylCox_0-1658486579695.png

but this is the response i get

DarylCox_1-1658486636101.png

i know the URL is correct as it works in Postman and i get a valid token.

could it be to do with these elements i have set in Postman

DarylCox_2-1658486747165.png

@amitchandak 

amitchandak
Super User
Super User

@DarylCox , refer if this can help

https://www.advaiya.com/generate-dynamic-token-and-get-data-from-custom-api-in-power-bi/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Many thanks for this.

 

managed to connect to the API, just struggling with the final part to automatically refresh the token each time.

 

i am suspecting it is because i have another parameter of tenant to include so will keep trying

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors