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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Shlokyy
Regular Visitor

How to use Power Bi Apis without Azure Aad.?

I am embedding power pi report in react, problem is access token is expired in one hour I want to refresh this token after 45 minute using power bi APIs but I don't have azure aad how can I refresh my token without azure ad, i have my own server can I host my power bi report there, and use there APIs to refresh tokens and send any post method to power bi..?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Shlokyy ,
Thanks for the reply, according to what the documentation indicates, you can't go and skip registering Azure AD to use the api to refresh the token.
For more information on how to use the getNewUserAccessToken() function, you can refer to this thread
Solved: How to implement getNewUserAccessToken() function ... - Microsoft Fabric Community


Best regards,

Albert He

 

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

4 REPLIES 4
Shlokyy
Regular Visitor

Yeah, It's right but in the given documentation i have function like this  newAccessToken = await getNewUserAccessToken(reportId, groupId); so in the documentation there is no explaination for getNewUserAccessToken like what to code inside this and if i am assuming that we need to call power bi apis inside this function to get the new accessToken, that means scenario is again go to top, where i need to register for azure Aad and all...! am I right ???

Anonymous
Not applicable

Hi @Shlokyy ,
Thanks for the reply, according to what the documentation indicates, you can't go and skip registering Azure AD to use the api to refresh the token.
For more information on how to use the getNewUserAccessToken() function, you can refer to this thread
Solved: How to implement getNewUserAccessToken() function ... - Microsoft Fabric Community


Best regards,

Albert He

 

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

can I write a node code to get refresh token from aad

Anonymous
Not applicable

Hi @Shlokyy ,

According to the documentation I've looked up, using the Power BI APIs (including those for token refresh and POST methods) requires authentication via Azure AD, which is a necessary step to ensure secure interaction with the Power BI service. If you want to refresh the token to get the latest token to refresh the report, you can either refresh the access token directly via setAccessToken or implement the getNewUserAccessToken () function, which you can see sample code for in this documentation .
Permission tokens needed to embed a Power BI app - Power BI | Microsoft Learn
For those of you who want to host power reports on your own server, our recommendation is that you use the official power bi report server for report management, this program allows you to diversify and direct the management of reports.
What is Power BI Report Server? - Power BI | Microsoft Learn
Create a Power BI report for Power BI Report Server - Power BI | Microsoft Learn

Best regards,

Albert He

 

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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