无法在App registrations中找到Bot Channels Registration,需更新过期客户端密钥
Bot Channels Registration客户端密钥过期更新方案
方法一:通过Azure AD PowerShell操作
- 安装并导入Azure AD模块:
Install-Module -Name AzureAD Import-Module AzureAD - 连接到Azure AD:
Connect-AzureAD - 按Bot名称查找对应的服务主体,记录返回的
AppId:Get-AzureADServicePrincipal -Filter "DisplayName eq '你的Bot显示名称'" - 用
AppId定位关联的应用注册:Get-AzureADApplication -Filter "AppId eq '上述记录的AppId'" - 创建新的客户端密钥(有效期最长2年):
执行后会生成新密钥,务必立即复制保存,后续无法再次查看。$startDate = Get-Date $endDate = $startDate.AddYears(2) $passwordCredential = New-Object Microsoft.Open.AzureAD.Model.PasswordCredential $passwordCredential.StartDate = $startDate $passwordCredential.EndDate = $endDate $passwordCredential.DisplayName = "Bot更新密钥" # 替换为应用注册的ObjectId New-AzureADApplicationPasswordCredential -ObjectId "应用注册ObjectId" -PasswordCredential $passwordCredential - 回到Bot Channels Registration的Configuration页面,将新密钥填入
Microsoft App ID Password字段并保存。
方法二:通过Azure门户Enterprise applications查找隐藏应用注册
- 进入Azure门户的Enterprise applications,切换到「所有应用程序」视图,搜索你的Bot名称,找到对应的服务主体。
- 进入该服务主体的「属性」页面,复制「应用程序 ID」。
- 回到App registrations页面,在搜索框直接粘贴刚才复制的「应用程序 ID」,即可找到对应的隐藏应用注册。
- 进入该应用注册的「证书和密码」页面,创建新客户端密钥,再将密钥更新到Bot的Configuration配置中。
内容的提问来源于stack exchange,提问作者Viktor Ivliiev
相关产品推荐
相关产品推荐

