Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure active directory 无法使用API创建Power Bi数据源_Azure Active Directory_Powerbi - Fatal编程技术网

Azure active directory 无法使用API创建Power Bi数据源

Azure active directory 无法使用API创建Power Bi数据源,azure-active-directory,powerbi,Azure Active Directory,Powerbi,我正在尝试按照Microsoft提供的方法创建Power Bi数据源。但获取错误请求DMTS_InvalidConnectionDetailsError错误。这是我的post数据示例 { "dataSourceType": "SQL", "connectionDetails": "{\"Server\":\"MySqlServer\",\"Database\":\"MySqlDatabase\"}", "datasourceName": "New Datasource", "cr

我正在尝试按照Microsoft提供的方法创建Power Bi数据源。但获取错误请求DMTS_InvalidConnectionDetailsError错误。这是我的post数据示例

{
  "dataSourceType": "SQL",
  "connectionDetails": "{\"Server\":\"MySqlServer\",\"Database\":\"MySqlDatabase\"}",
  "datasourceName": "New Datasource",
  "credentialDetails": {
    "credentialType": "Basic",
    "credentials": "{\"credentialData\":[{\"name\":\"username\", \"value\":\"MyUsername\"},{\"name\":\"password\", \"value\":\"MyPassword\"}]}",
    "encryptedConnection": "Encrypted",
    "encryptionAlgorithm": "RSA-OAEP",
    "privacyLevel": "None"
  }
}
下面是json的响应

{
  "error": 
  {
    "code": "DMTS_InvalidConnectionDetailsError",
    "pbi.error": {
      "code": "DMTS_InvalidConnectionDetailsError",
      "parameters": {},
      "details": [],
      "exceptionCulprit": 1
    }
  }
}

任何人都可以帮忙吗?

凭证详细信息中的凭证需要使用RSA算法进行加密,然后才能传递给API。您可以使用中的算法。此外,如果服务器有\个字符,则服务器名称的\个字符数需要增加一倍