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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
MaheshMole
Frequent Visitor

Power BI REST API UpdateDatasource: Operation is not supported for selector #2 for SQL Server

URLhttps://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/datasets/{datasetId}/Default.UpdateDatasourc...

Post Request body: 

 

 

{"updateDetails":[
                {
                    "datasourceSelector": {
                        "datasourceType": "Sql",
                        "connectionDetails": {
                            "server": "oldSqlServer.database.windows.net",
                            "database": "oldDatabase"
                        }
                    },
                   
                    "connectionDetails": {
                          "server": "newSqlServer.database.windows.net",
                          "database": "newDatabase"
                    }
                }
            ]}

 

 

 

gives error :

 

 

{
    "error": {
        "code": "InvalidRequest",
        "message": "Operation is not supported for selector #2"
    }
}

 

 

 

The same type of request for AnalysisServices datasource works but fails for SQL server. The server and database is correct. We tried updating with same value as well and then also it fails. The same values update works for AnalysisServices datasource. 

 

We found same type of issue https://community.powerbi.com/t5/Developer/quot-Operation-is-not-supported-for-selector-quot-when-us... in community forum but there is no specific solution. 

1 ACCEPTED SOLUTION
Jayendran
Solution Sage
Solution Sage

2 REPLIES 2
Jayendran
Solution Sage
Solution Sage

Hi @MaheshMole ,

Can you please verify the below restriction 

 

 

 

 

Capture.JPG

We are not chaning Datasource type.

We want to change Server Name, Database name, user name and password. Is it mean that changing username and password (connection string paremeter) is not supported?

 

We are using import data not direct query over Azure SQL so we are not using any joins or merge. 

 

Regards,

Mahesh

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.