广告中的Azure门户应用程序说,即使在我更新证书后,证书也已过期

广告中的Azure门户应用程序说,即使在我更新证书后,证书也已过期,azure,azure-active-directory,certificate,Azure,Azure Active Directory,Certificate,我的广告应用程序证书已过期,我已放入一个新证书并删除了所有过期的旧证书,但是当我转到应用程序时,它仍然显示为已过期您可以按照以下步骤为您的广告应用程序创建新的证书凭据 1.在本地运行PowerShell命令,将-FilePath更改为所需 $cert=New-SelfSignedCertificate -Subject "CN=TodoListDaemonWithCert" -CertStoreLocation "Cert:\CurrentUser\My" -KeyExportPolicy E

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

您可以按照以下步骤为您的广告应用程序创建新的证书凭据

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.在门户->你的广告应用->
证书和机密->上传证书-/code>中导航到
Azure Active Directory


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

连接AzaAccount
$cert=新的自签名证书-主题“CN=TodoListDaemonWithCert”-CertStoreLocation“cert:\CurrentUser\My”-KeyExportPolicy Exportable-KeySpec签名
$binCert=$cert.GetRawCertData()
$credValue=[System.Convert]::ToBase64String($binCert)
新AzADAppCredential-ApplicationId-CertValue$credValue-StartDate$cert.NotBefore-EndDate$cert.NotAfter

正确答案取决于问题中没有的细节。从哪个应用程序以及如何配置它来检索证书开始。某些应用程序将需要重新启动。这可能是由于缓存的原因,请尝试Ctrl+F5?嗨,有关于此问题的更新吗?如果我的回答是有帮助的,请像这样接受它,这将有利于其他人,谢谢。
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