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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
lexsmeets_
Frequent Visitor

Power BI REST API password rotation on AD credentials

Currently I am working on a way to automate deployment of Power BI pbix files. An important part of the solution is to set credentials on the data sources. The organization has a Power BI environment with approx. 40.000 connection. The vast majority being Excel and cvs files and 2500 of these connections are SQL Server connections. Company polices require to connect to SQL server (on-prem + cloud) only with AD / AAD credentials (so no Basic authentication, and preferably an SPN) and we are also pushed by security architects to set up automated password rotation.

 

About 6 month ago, I got to the point I could create with an C# azure function an oAuth2 token, but the validation was only 45-60 minutes. This would result in somewhat unpractical solution to update 2500 connections every 45-60 minutes, so we did not take this approach any further.

 

My question is of any one already had any succeeded in setting up connections with AD/AAD credentials in way that is practical to use on a large scale with multiple enterprise development teams creating Power BI projects. I already had a look at "https://powerbidevcamp.powerappsportals.com/sessions/session33/", but that stil leaves me with the 60 min limit on tokens

1 REPLY 1
Anonymous
Not applicable

Hi @lexsmeets_ ,

The token access lifetime is 1 hour and cannot be extended. There is no way to automatically refresh the token or extend the token lifetime. One workaround is to use Databricks Personal Access Token.

Connect Power BI to Azure Databricks - Azure Databricks | Microsoft Learn

Another option is to use incremental refresh feature in Power BI.

Configure incremental refresh and real-time data for Power BI datasets - Power BI | Microsoft Learn

Best Regards

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.