【问题标题】:Azure Portal Application in AD says certificate is expired even after I have updated itAD 中的 Azure 门户应用程序说证书已过期,即使我已更新它
【发布时间】:2020-04-09 09:01:59
【问题描述】:

我的 AD 应用程序证书已过期,我已将新的证书放入并删除了所有旧的过期证书,但是当我转到应用程序时,它仍然显示它已过期

【问题讨论】:

  • 正确答案取决于您的问题中没有的细节。从什么应用程序以及如何配置它来检索证书开始。一些应用程序需要重新启动。
  • 可能是缓存的原因,试试Ctrl+F5?
  • 嗨,这个问题有什么更新吗?如果我的回答有帮助,请像这样收下i.stack.imgur.com/LkiIZ.png,对别人有好处,谢谢。

标签: azure azure-active-directory certificate


【解决方案1】:

您可以按照以下步骤为您的 AD 应用创建新的证书凭据。

1.在本地运行PowerShell命令,将-FilePath改成你想要的。

$cert=New-SelfSignedCertificate -Subject "CN=TodoListDaemonWithCert" -CertStoreLocation "Cert:\CurrentUser\My"  -KeyExportPolicy Exportable -KeySpec Signature
Export-Certificate -Cert $cert -FilePath C:\Users\joyw\Desktop\user1234.cer

2.导航到门户中的Azure Active Directory -> 您的AD App -> Certificates & secrets -> Upload certificate


或者如果你不想手动上传证书,你可以使用下面的 powrshell 脚本,运行脚本后,刷新门户,你会发现它工作正常。确保安装 Az 模块。

Connect-AzAccount
$cert=New-SelfSignedCertificate -Subject "CN=TodoListDaemonWithCert" -CertStoreLocation "Cert:\CurrentUser\My"  -KeyExportPolicy Exportable -KeySpec Signature
$binCert = $cert.GetRawCertData()
$credValue = [System.Convert]::ToBase64String($binCert)
New-AzADAppCredential -ApplicationId <application-id of the AD App> -CertValue $credValue -StartDate $cert.NotBefore -EndDate $cert.NotAfter

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-11-29
    • 1970-01-01
    • 2011-10-29
    • 2014-09-22
    • 2013-06-24
    • 2018-01-30
    • 2016-09-06
    • 2018-08-27
    相关资源
    最近更新 更多