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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
We have written a VSTS extension that will create, update or delete data source in our on premise gateway where we have been successful for data source types SQL, URL (basic), Oracle, however I am struggling with creating a folder data source.
I am getting error - "{"code":"DMTS_UnsupportedConnectionStringError","pbi.error":{"code":"DMTS_UnsupportedConnectionStringError","parameters":{},"details":[],"exceptionCulprit":1}}}.Exception.Message" when calling https://api.powerbi.com/v1.0/myorg/gateways/{gatewayId}/datasources
The request body consists of
$Credential = Encode-Credential -Username $winUserName -Password $winPassword -GatewayPublicKeyExponent $gatewayObj.publicKey.exponent -GatewayPublicKeyModulus $gatewayObj.publicKey.modulus
$bodyHash=New-Object -TypeName Hashtable
$bodyHash.Add("dataSourceType","$dataSourceType")
$bodyHash.Add("connectionDetails","{""Full path"":""$($folderPathName)""}")
$bodyHash.Add("datasourceName",$datasourceName)
$credentialDetails = @{
credentialType = "Windows"
credentials = $Credential
encryptedConnection = "Encrypted"
privacyLevel = "Private"
encryptionAlgorithm = "RSA-OAEP"
}
$bodyHash.Add("credentialDetails",$credentialDetails)
$reqBody = $bodyHash | ConvertTo-Json
Has anybody got this to work, or is it not possible for folder data source type? Here is a working example I manually created
Hi @hugh-mandg ,
Has your problem been solved, if so, please consider Accept a correct reply as the solution to help others find it.
Best Regards
Lucien
Hi @hugh-mandg ,
Is your "Edit parameter" disabled in Power BI Service, if so, see a similar thread here.
Please check if your report can refresh successfully without managing the parameter.
If there is error when refreshing, please refer to the following guide:
Unable to update parameters in published dataset (custom data connector)
Best Regards
Lucien
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!