[英]Accidentally Deleted Azure Multi-factor Auth client Service principal via powershell, how to restore it?
通过Power Shell意外删除了Azure Multi-factor Auth客户端服务主体,如何恢复?
你可以尝试运行PowerShell 脚本来恢复它,PowerShell 脚本是在你为 Azure MFA 安装 NPS 扩展时创建的。
Get-AzureADServicePrincipal | Where-Object { $_.appid -match '981f26a1-7f43-403b-a875-f8b09b8cd720' } # did not show Azure Multi-factor auth client in list.
created new service principal for Azure Multi-factor auth client from below command.
new-AzureADServicePrincipal -AppId 981f26a1-7f43-403b-a875-f8b09b8cd720
set-AzureADServicePrincipal -AppId 981f26a1-7f43-403b-a875-f8b09b8cd720 -ObjectId b9ffe563-20b2-4ada-98f0-665cd878581c -AccountEnabled $true # object id obtained from above command
现在,当我使用对象 ID 进行搜索时,我可以查看服务主体。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.