Reply
CHAUHAN812
Frequent Visitor

Power BI Services Connections Authentication Credentials

In my Power BI Services, many connections are established through the On-premises data gateway, which uses my system's windows authentication for creating the connections. The On-premises data gateway is installed on an AWS Server, and I use my organization email ID to sign in.

 

Whenever I change my system password, I need to manually update my new passwords to all the established connections. I want to automate this process so that my password synchronizes with the Power BI services connections automatically.

 

How can we achieve this automation?

2 ACCEPTED SOLUTIONS
nilendraFabric
Community Champion
Community Champion

Hello @CHAUHAN812 

Recommended Best Practice is to 

Replace individual user credentials with a non-expiring service account specifically for Power BI gateway connections

 

Configure the gateway to use this account instead of personal credentials.
• Use tools like Azure Key Vault or Secret Server  to manage/rotate the service account password securely.

 

If a service account is not feasible, use the Power BI REST API to programmatically update credentials across all connections.

 

 

View solution in original post

v-jtian-msft
Community Support
Community Support

Hi,nilendraFabric ,thanks for your concern about this issue.

Your answer is excellent!
And I would like to share some additional solutions below.


Hello,@CHAUHAN812 .I am glad to help you.

You can write code to automate the process of performing changes to the data source credentials of a gateway connection. (use the Rest API/PowerShell)

I hope that the following article will be helpful to you.
URL:
How to update credentials for an on-prem Power BI data source using PowerShell
This involves the process of getting the Gateway ID, DataSource ID, setting the type of authentication method, as well as Python programming, and the entire code design requires collaboration between you and the programmers on your team.
I also found an issue with the same requirement, and the user in the link also provided code that helped him.

URL:
Solved: Update Datasource Credential Using Only Powershell... - Microsoft Fabric Community
 
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
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

3 REPLIES 3
v-jtian-msft
Community Support
Community Support

Hi,nilendraFabric ,thanks for your concern about this issue.

Your answer is excellent!
And I would like to share some additional solutions below.


Hello,@CHAUHAN812 .I am glad to help you.

You can write code to automate the process of performing changes to the data source credentials of a gateway connection. (use the Rest API/PowerShell)

I hope that the following article will be helpful to you.
URL:
How to update credentials for an on-prem Power BI data source using PowerShell
This involves the process of getting the Gateway ID, DataSource ID, setting the type of authentication method, as well as Python programming, and the entire code design requires collaboration between you and the programmers on your team.
I also found an issue with the same requirement, and the user in the link also provided code that helped him.

URL:
Solved: Update Datasource Credential Using Only Powershell... - Microsoft Fabric Community
 
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

nilendraFabric
Community Champion
Community Champion

Hello @CHAUHAN812 

Recommended Best Practice is to 

Replace individual user credentials with a non-expiring service account specifically for Power BI gateway connections

 

Configure the gateway to use this account instead of personal credentials.
• Use tools like Azure Key Vault or Secret Server  to manage/rotate the service account password securely.

 

If a service account is not feasible, use the Power BI REST API to programmatically update credentials across all connections.

 

 

Thank You Nilendra for your solution of using service account instead of my personal credentials.

So in that case should I sign into the On premises gateway with the Service account as well along with the Power bi connections ?

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)