Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 24 | |
| 9 | |
| 9 | |
| 6 | |
| 5 |