我想通过Azure Logic App获取ADP客户端的令牌信息。我拥有 ADP 的客户端证书,因此我决定使用逻辑应用程序中的 HTTP 触发器并选择身份验证类型“客户端证书”。由于我无法直接在逻辑应用程序中使用证书,因此我将证书转换为 base64Encoded .pfx 格式,并且证书没有任何密码。以下是请求的示例代码
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {},
"contentVersion": "1.0.0.0",
"outputs": {},
"triggers": {
"HTTP": {
"inputs": {
"authentication": {
"pfx": "convertedbase64string",
"type": "ClientCertificate"
},
"body": "grant_type=client_credentials&client_id=ClientId&client_secret=client_secret",
"headers": {
"content-type": "application/x-www-form-urlencoded"
},
"method": "POST",
"uri": "https://accounts.adp.com/auth/oauth/v2/token"
},
"recurrence": {
"frequency": "Month",
"interval": 15
},
"type": "Http"
}
}
},
"kind": "Stateful"
}
Run Code Online (Sandbox Code Playgroud)
上面的请求返回了错误的请求,任何人都可以帮助我这里出了什么问题吗?
For converting into base64 I used below steps in power shell
$pfx_cert = get-content 'C:\sample\adpcertificate.pfx' -Encoding Byte
$output …Run Code Online (Sandbox Code Playgroud)