Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.