问题陈述:
续订在 Azure AD 下注册的应用程序中的证书。
问题:
我在从 MS Graph API 发送补丁时遇到问题> 应用程序 - PATCH 更新应用程序属性。
问题是每当我尝试更改 KeyCredentials 并上传时都会失败,并显示键值不能为 null 或空。现在,当我通过 GET 检索应用程序属性详细信息检查其他证书时,它们为空。我无法理解这个键值是什么,因为我尝试使用 OpenSSL 在本地读取我的证书,但找不到任何这样的值。
任何人都可以在 RestAPI 中帮助我,或者是否有任何 SDK 可以帮助上传证书。
问候
最佳答案
问题是每当我尝试更改 KeyCredentials 并上传它时 失败,键值不能为 null 或为空。
Ans: The Key Credential requires a value to be uploaded in key , otherwise it will fail.
现在,当我从 GET 检索中检查其他证书时 应用程序属性详细信息,它们为空。
Ans: It by default shows the secure string values as null when you do a select then only you can find out the secure string values.
我无法理解这个键值是什么,因为我尝试使用 OpenSSL 在本地读取我的证书,但找不到任何此类值。
Ans: When you open the .cer file in wordpad it will show you something like :
-----BEGIN CERTIFICATE----- <<sensitive_values>> -----END CERTIFICATE-----
Basically the sensitive value can be used for the value of key .
但是假设我还想要完整的字段和 key ,我必须提供 select= 中的所有字段...是否有其他方法来处理此问题?
Ans: There is no other way to get the values , except for selecting all the required fields you need.
有什么方法可以上传文件,而不是读取数据并发出补丁请求吗?
Ans: Unfortunately No, As of now there is no direct way to upload a cert file instead of reading it and then uploading it.
关于python - 从azure Rest api上传证书失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69618811/