客户秘密ID到期日 - 提供主机应用程序 [英] Client Secret ID expiry date - Provided Host app

查看:114
本文介绍了客户秘密ID到期日 - 提供主机应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个SharePoint提供的主机应用程序,客户端ID为"xxxxxx-xxxx-xxxx" -xxxx"和密码为"xxxx-xx-x-xxx"。

现在秘密ID已超过12个月。现在我们想要延长到期日并在命令下面执行:

  Connect-MsolService

$ clientId =' xxxxxx-xxxx-xxxx-xxxx'

$ bytes = New-Object Byte [] 32

$ rand = [System。 Security.Cryptography.RandomNumberGenerator] :: Create()

$ rand.G etBytes($ bytes)

$ rand.Dispose()

$ newClientSecret = [System.Convert] :: ToBase64String($ bytes)

New-MsolServicePrincipalCredential -AppPrincipalId $ clientId -Type Password -Usage Verify -Value $ newClientSecret

New-MsolServicePrincipalCredential -AppPrincipalId $ clientId -Type Symmetric -Usage Sign -Value $ newClientSecret

New-MsolServicePrincipalCredential -AppPrincipalId $ clientId -Type Symmetric -Usage Verify -Value $ newClientSecret

$ newClientSecret

< u1:p>执行完毕后,我仍能看到旧的到期日期。< / u1:p>

Get-MsolServicePrincipalCredential -AppPrincipalId" xxxxxx-xxxx-xxxx-xxxx" -ReturnKeyValues $ true。

我们按照以下步骤解决了这个问题:

1.删除应用程序主体ID Azure Active Directory:

Remove-MsolServicePrincipal -AppPrincipalId" xxxxxx-xxxx-xxxx-xxxx"

2.使用appregnew.aspx页面注册了具有旧客户端ID和密码ID的新应用程序。

3.从"appinv.aspx"页面提供足够的权限

现在应用程序开始工作了。

延长有效期的最佳做法是什么?

What is the best practice to extend the expiry date?

谢谢,

Surya

谢谢,苏里亚

推荐答案

根据你的描述,我的理解是你想知道为应用程序花费客户机密的到期日的最佳做法。

According to your description, my understanding is that you want to know the best practice to expend the expiry date of client secret for app.

默认情况下,SharePoint应用程序Client Secret将在一年后到期。如果您想延长到期日期,则没有直接为了延长秘密到期日期,您需要为应用程序创建一个新秘密来替换旧密码。

By default, SharePoint app Client Secret will expire after one year. If you want to extend the expiry date, there is no direct way to extend the secret expiry date, you need to create a new secret for the apps to replace the old one.

有关更详细的步骤,请参阅以下文章:

For more detailed steps you can refer the article below:

如何:替换即将到期适用于SharePoint的应用中的客户端密码

谢谢

最好的问候


这篇关于客户秘密ID到期日 - 提供主机应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆