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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
lea_313
Helper I
Helper I

Power bi profile password changes

We have around 40 individual power bi reports with various data sets that have been built with example@microsoftaccount.com

 

When we change the password for example@microsoft  it breaks all of the refreshes scheduled on the reports. I then have to download them all individually, sign in and re-publish the report. This takes hours

 

How can I update the password linking to all of these reports in one go?

 

Each report has its own data set, some of the data sets at the same. 

 

Thanks 

 

 

2 ACCEPTED SOLUTIONS
ibarrau
Super User
Super User

Hi. When the password change, you must reconfigure data sources. You should download and login at power bi desktop because the service portal doesn't care, it has its own credentials. When you change the password for service you need to think about the datasources involved and not the specific report.

Open "Manage Connections and Gateways" and the first tab contains all connections. Edit the sources affected. Change credentials. Once you change that, all refreshes using the source should be fixed.

ibarrau_0-1728563086777.png

 

I hope that helps,


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

Happy to help!

LaDataWeb Blog

View solution in original post

Your solution is great ibarrau 

Hi, @lea_313 

Power BI does not have a direct function to update this password. However, Power BI provides an API to update the gateway link credentials. You can call these APIs programmatically to quickly update the credentials.

First, here is the API you mainly call:

Gateways - Update Datasource - REST API (Power BI Power BI REST APIs) | Microsoft Learn

vjianpengmsft_0-1728892253838.png

It uses the patch method and then passes the parameters we need to update in the request body:

{
  "credentialDetails": {
    "credentialType": "Basic",
    "credentials": "{\"credentialData\":[{\"name\":\"username\", \"value\":\"john\"},{\"name\":\"password\", \"value\":\"*****\"}]}",
    "encryptedConnection": "Encrypted",
    "encryptionAlgorithm": "None",
    "privacyLevel": "None",
    "useEndUserOAuth2Credentials": "False"
  }
}

vjianpengmsft_1-1728892364091.png

You mentioned that you have 40 gateway connection with the same credentials, you can set their datasourceId to an array variable, and then iterate through the entire array when sending a request. The official provides some code examples:

PowerBI-Developer-Samples/PowerShell Scripts/PatchDatasourceCredentials.ps1 at master · microsoft/Po...

vjianpengmsft_2-1728892539376.png

If you don't know the datasourceId of your gateway link, you can call the entire API below:

Gateways - Get Datasources - REST API (Power BI Power BI REST APIs) | Microsoft Learn

vjianpengmsft_3-1728892716337.png

Get the API called by gatewayId:

Gateways - Get Gateways - REST API (Power BI Power BI REST APIs) | Microsoft Learn

vjianpengmsft_4-1728892812544.png

After these few API calls, you have the gatewayId, datasourceId, and credentialDetails that need to be updated. You can then send a request to quickly update your credentials.

This is a quick method, but it requires some programming knowledge.

Solved: Manage password change for multiple reports - Microsoft Fabric Community

 

Best Regards

Jianpeng Li

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
lea_313
Helper I
Helper I

Hi

 

Thanks for the suggestion, this definitley looks like a quicker solution

 

I still have about 40 different connections to update though, they all use the same credentials. Is there any way to update all the connections in one go? Or do I have to go line by line?

 

Thanks again

 

Leanne

Your solution is great ibarrau 

Hi, @lea_313 

Power BI does not have a direct function to update this password. However, Power BI provides an API to update the gateway link credentials. You can call these APIs programmatically to quickly update the credentials.

First, here is the API you mainly call:

Gateways - Update Datasource - REST API (Power BI Power BI REST APIs) | Microsoft Learn

vjianpengmsft_0-1728892253838.png

It uses the patch method and then passes the parameters we need to update in the request body:

{
  "credentialDetails": {
    "credentialType": "Basic",
    "credentials": "{\"credentialData\":[{\"name\":\"username\", \"value\":\"john\"},{\"name\":\"password\", \"value\":\"*****\"}]}",
    "encryptedConnection": "Encrypted",
    "encryptionAlgorithm": "None",
    "privacyLevel": "None",
    "useEndUserOAuth2Credentials": "False"
  }
}

vjianpengmsft_1-1728892364091.png

You mentioned that you have 40 gateway connection with the same credentials, you can set their datasourceId to an array variable, and then iterate through the entire array when sending a request. The official provides some code examples:

PowerBI-Developer-Samples/PowerShell Scripts/PatchDatasourceCredentials.ps1 at master · microsoft/Po...

vjianpengmsft_2-1728892539376.png

If you don't know the datasourceId of your gateway link, you can call the entire API below:

Gateways - Get Datasources - REST API (Power BI Power BI REST APIs) | Microsoft Learn

vjianpengmsft_3-1728892716337.png

Get the API called by gatewayId:

Gateways - Get Gateways - REST API (Power BI Power BI REST APIs) | Microsoft Learn

vjianpengmsft_4-1728892812544.png

After these few API calls, you have the gatewayId, datasourceId, and credentialDetails that need to be updated. You can then send a request to quickly update your credentials.

This is a quick method, but it requires some programming knowledge.

Solved: Manage password change for multiple reports - Microsoft Fabric Community

 

Best Regards

Jianpeng Li

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

 

 

 

 

ibarrau
Super User
Super User

Hi. When the password change, you must reconfigure data sources. You should download and login at power bi desktop because the service portal doesn't care, it has its own credentials. When you change the password for service you need to think about the datasources involved and not the specific report.

Open "Manage Connections and Gateways" and the first tab contains all connections. Edit the sources affected. Change credentials. Once you change that, all refreshes using the source should be fixed.

ibarrau_0-1728563086777.png

 

I hope that helps,


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

Happy to help!

LaDataWeb Blog

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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