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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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