gpt4 book ai didi

azure - 如何删除之前创建的自定义签名证书

转载 作者:行者123 更新时间:2023-12-03 02:05:05 24 4
gpt4 key购买 nike

我正在使用https://learn.microsoft.com/en-us/graph/application-saml-sso-configure-api?tabs=http%2Cpowershell-script为雪花应用程序实现 SSO 自动化

我用过

选项 1:在 Azure AD 中创建签名证书

提前创建签名证书,但我想使用 API 调用将其删除。

如何使用 API 调用删除签名证书。

最佳答案

根据文档,自签名证书由keyCredential组成。对象和passwordCredential添加到 servicePrincipal 的对象.

因此,您需要删除 keyCredentialspasswordCredentials .

当你打电话时

POST /servicePrincipals/{id}/addTokenSigningCertificate

它返回 selfSignedCertificate对象并创建一个新的 keyCredential对象和一个新的passwordCredential对象。

所有对象 keyCredential , passwordCredentialselfSignedCertificate具有相同的值customKeyIdentifier属性。

keyCredential对象将被添加到属性 keyCredentialsservicePrincipal .

passwordCredential对象将被添加到属性 passwordCredentialsservicePrincipal .

删除

现在您需要删除 keyCredentialpasswordCredential具有相同值 customKeyIdentifier 的对象属性。

删除passwordCredential对象调用

POST /servicePrincipals/{id}/removePassword
Content-type: application/json

{
"keyId": "{key_id}"
}

正确的keydId用于passwordCredential对象 customKeyIdentifier值等于customKeyIdentifier当您调用 POST /servicePrincipals/{id}/addTokenSigningCertificate 时返回

删除keyCredential对象调用

POST /servicePrincipals/{id}/removeKey
Content-Type: application/json

{
"keyId": "{key_id}",
"proof":"{proof}"
}

正确的keydId用于keyCredential对象 customKeyIdentifier值等于customKeyIdentifier当您调用 POST /servicePrincipals/{id}/addTokenSigningCertificate 时返回

文档

Add token signing certificate

Service principal: Remove key

Service principal: Remove password

passwordCredential

keyCredential

关于azure - 如何删除之前创建的自定义签名证书,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75100918/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com