为了轻松部署,我希望在 Office 365 Azure AD 中自动执行应用程序注册过程。申请证书并授予日历或事件目录或图表的某些权限的手动过程复杂且耗时。
我想简化整个注册和部署过程,以便过程顺利进行。
最佳答案
我向新的 Microsoft 在线 ServicePrincipal 发送了以下命令
C:\PS>$cer = New-Object System.Security.Cryptography.X509Certificates.X509Certificate
$cer.Import("C:\temp\myapp.cer")
$binCert = $cer.GetRawCertData()
$credValue = [System.Convert]::ToBase64String($binCert);
New-MsolServicePrincipal -ServicePrincipalNames @("MyApp/myApp.com")
-DisplayName "My Application"
-Type asymmetric -Value $credValue
创建了新的服务主体对象。
您需要连接到 MsolService
$Credential = Get-Credential
Connect-MsolService -Credential $Credential
关于powershell - 如何使用 powershell 在 Azure AD 中自动注册 Office 365 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42781260/