Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
For a pbi with datasource mode Import, I'am able to change the Username and Password but not able to change ConnectionString.
For my test
If I only change DataModelDataSource\Username and DataModelDataSource\Password its OK (200)
If I change ConnectionString its 400 Bad Request
Solved! Go to Solution.
Hi, @m1417
You might be able to try the following body code, it will work:
[
{
"Id": "uid", // Replace with the actual ID of the data source
"Name": "your_datasource_name",
"Description": "your_description",
"Path": "your_path",
"Type": "DataSource",
"Hidden": false,
"Size": 0,
"ModifiedBy": "your_username",
"ModifiedDate": "2022-01-21T12:07:41.557+01:00",
"CreatedBy": "your_username",
"CreatedDate": "2022-01-21T09:31:56.927+01:00",
"ParentFolderId": null,
"IsFavorite": false,
"IsEnabled": true,
"ConnectionString": "Server=XXXservernameXXX;Database=XXXdatabasenameXXX;Encrypt=True;TrustServerCertificate=True;Connection Timeout=30;", // Example connection string
"DataSourceType": "SQL",
"IsConnectionStringOverridden": true,
"IsReference": false,
"DataSourceSubType": "DataModel",
"CredentialsByUser": null,
"CredentialsInServer": null,
"DataModelDataSource": {
"Type": "Import",
"Kind": "SQL",
"AuthType": "UsernamePassword",
"SupportedAuthTypes": [
"Windows",
"UsernamePassword"
],
"Username": "your_username",
"Secret": "your_password",
"ModelConnectionName": ""
}
}
]
If this post helps, then please consider Accept it as the solution and kudos to this post to help the other members find it more quickly
Hi, @m1417
You might be able to try the following body code, it will work:
[
{
"Id": "uid", // Replace with the actual ID of the data source
"Name": "your_datasource_name",
"Description": "your_description",
"Path": "your_path",
"Type": "DataSource",
"Hidden": false,
"Size": 0,
"ModifiedBy": "your_username",
"ModifiedDate": "2022-01-21T12:07:41.557+01:00",
"CreatedBy": "your_username",
"CreatedDate": "2022-01-21T09:31:56.927+01:00",
"ParentFolderId": null,
"IsFavorite": false,
"IsEnabled": true,
"ConnectionString": "Server=XXXservernameXXX;Database=XXXdatabasenameXXX;Encrypt=True;TrustServerCertificate=True;Connection Timeout=30;", // Example connection string
"DataSourceType": "SQL",
"IsConnectionStringOverridden": true,
"IsReference": false,
"DataSourceSubType": "DataModel",
"CredentialsByUser": null,
"CredentialsInServer": null,
"DataModelDataSource": {
"Type": "Import",
"Kind": "SQL",
"AuthType": "UsernamePassword",
"SupportedAuthTypes": [
"Windows",
"UsernamePassword"
],
"Username": "your_username",
"Secret": "your_password",
"ModelConnectionName": ""
}
}
]
If this post helps, then please consider Accept it as the solution and kudos to this post to help the other members find it more quickly
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 8 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 17 | |
| 6 | |
| 4 | |
| 3 | |
| 2 |