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
Anonymous
Not applicable

how to update connectionDetails for datasource in gateway

using Try it from https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/get-datasource I am able to see below JSON output by providing datasourceId and gatewayId

 

{ "@odata.context": "http://api.powerbi.com/v1.0/myorg/$metadata#gatewayDatasources/$entity",

"id": "xxxxxxxxxxxxx", "

gatewayId": "xxxxxxxxxxxxxxx",

"datasourceType": "Web",

"connectionDetails": "{\"url\":\"https://servicesxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"}", "credentialType": "Anonymous",

"credentialDetails": { "useEndUserOAuth2Credentials": false }

}

what I want is to update "connectionDetails" by replacing "https://servocesxxxxxxxxxxxxxxxxxxxxxxxxxx" with new url. so I use try it from : https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/update-datasource#code-try-0

 

I fill up with same datasourceid and gatewayid, and provide JSON as below.

 

it returns error "{"error":{"code":"PowerBIEntityNotFound","pbi.error":{"code":"PowerBIEntityNotFound","parameters":{},"details":[],"exceptionCulprit":1}}}" . I believe it is due to string of new url ""{\"url\":\"https://xxxxxxxxxxxxxxxxxxxxxxxxxxx\"}"," should not be fit with "credentials"

 

{

"credentialDetails":

{ "credentialType": "Anonymous",

"credentials": "{\"url\":\"https://xxxxxxxxxxxxxxxxxxxxxxxxxxx\"}",

"encryptedConnection": "Encrypted",

"encryptionAlgorithm": "None",

"privacyLevel": "None" }

}

 

from Doc of PowerBI rest API, I could not find any helpful instruction about how to update "connectionDetails" for dataset in the specific gateway Please shed the light if possible. Many Thanks

3 REPLIES 3
lbendlin
Super User
Super User

When they say connection details they mean username and password.  You cannot change the URL etc through this call.

Anonymous
Not applicable

is there workaround to change url? 

The workaround is to recreate your connection. Much faster than wasting time on trying other avenues.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

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.