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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
novelmayank
Frequent Visitor

Connecting QuickBooks Online to Power BI via API (OAuth2) - Issue with Refreshing Access Token

Hello everyone,

I am attempting to connect QuickBooks Online to Power BI using the API with OAuth2 authentication. I have tried several methods to get the data, including:

  • Power BI Web connector
  • QuickBooks connector
  • Custom connector (this was quite challenging to build, so I might have made some mistakes)
  • Python script

Out of these methods, the Python script has been the most successful. However, I'm facing an issue where I need to manually change the access token every time I want to refresh the data.

I've created a function to fetch a new access token, but when I replace the static access token with this function in my data script, it doesn't work. I have also tried implementing this solution in the Web connector, but without any success.

Has anyone encountered a similar issue or could provide guidance on how to automate the access token refresh process within Power BI? Any help or suggestions would be greatly appreciated.

Thank you!

 

@amitchandak it would be a great help if you could suggest something.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @novelmayank,

I'd like to suggest you use web connector to getting data from REST API. You can add a step to getting access token at first, then you can use this token in following steps. (this get token operation will be invoked every time the data source refresh to prevent the expired issue in other steps)

Solved: Pull data from a REST API Authentication - Microsoft Fabric Community

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

HI @novelmayank,

I'd like to suggest you use web connector to getting data from REST API. You can add a step to getting access token at first, then you can use this token in following steps. (this get token operation will be invoked every time the data source refresh to prevent the expired issue in other steps)

Solved: Pull data from a REST API Authentication - Microsoft Fabric Community

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.