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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.