Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am logging in with my credentials in OAuth2 mode and Organizational level, but every 24 or 48 hours the credentials expire and all flows stop working.
Has anyone experienced this and know how to solve it?
Solved! Go to Solution.
When using OAuth2 authentication in Power BI, it's common for tokens to expire after a certain period, usually 24 or 48 hours. This can disrupt automatic refreshes and other scheduled tasks. Here are some strategies to handle this issue:
Use a Service Principal:
Use Power Automate to Refresh Token:
Dedicated Service Account:
Step-by-Step Guide:
Register an Application in Azure AD:
Grant API Permissions:
Create a Client Secret:
Assign Power BI Service Principal Admin Role:
Configure Data Source in Power BI:
Configure the Power BI Data Source:
Set Up Automatic Refresh in Power BI Service:
If a service principal is not an option, you can use Power Automate to automate token refresh:
Create a Flow in Power Automate:
Add Actions to Refresh Token:
Using a service principal is the most reliable way to handle OAuth2 authentication in Power BI, ensuring that your credentials do not expire and disrupt your workflows. If a service principal is not feasible, automating the token refresh process using Power Automate can help maintain the validity of your OAuth2 tokens. These strategies will help ensure that your Power BI flows and automatic refreshes continue to work smoothly without frequent interruptions
When using OAuth2 authentication in Power BI, it's common for tokens to expire after a certain period, usually 24 or 48 hours. This can disrupt automatic refreshes and other scheduled tasks. Here are some strategies to handle this issue:
Use a Service Principal:
Use Power Automate to Refresh Token:
Dedicated Service Account:
Step-by-Step Guide:
Register an Application in Azure AD:
Grant API Permissions:
Create a Client Secret:
Assign Power BI Service Principal Admin Role:
Configure Data Source in Power BI:
Configure the Power BI Data Source:
Set Up Automatic Refresh in Power BI Service:
If a service principal is not an option, you can use Power Automate to automate token refresh:
Create a Flow in Power Automate:
Add Actions to Refresh Token:
Using a service principal is the most reliable way to handle OAuth2 authentication in Power BI, ensuring that your credentials do not expire and disrupt your workflows. If a service principal is not feasible, automating the token refresh process using Power Automate can help maintain the validity of your OAuth2 tokens. These strategies will help ensure that your Power BI flows and automatic refreshes continue to work smoothly without frequent interruptions
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!