我正在尝试从 azure key Vault 获取证书并希望根据服务原则上传它,但我收到方法不允许错误。
图形 API 调用 - PATCH
https://graph.microsoft.com/v1.0/applications?$filter=appId eq 'XXXXXXXXX'
从下面的文章中获取请求正文的步骤
https://docs.microsoft.com/en-us/graph/api/resources/keycredential?view=graph-rest-1.0
请注意 - 我已将证书转换为 Json(下面括号中给出的属性名称)
{ "@odata.type": //Given error so removed ,
"customKeyIdentifier": //Key vault's Certificate Identifier (kid),
"displayName": //已移除,
"endDateTime": //Key Vault 的证书到期日期 (exp),
"key": "Binary"://Key Vault 的证书证书 (Cer) ,
"keyId": //新 GUID,
"startDateTime": //证书创建日期(Created),
"type": "AsymmetricX509Cert",
"usage": "Verify"
}