powershell - 如何使用 powershell 在 Azure AD 中自动注册 Office 365 应用程序?

标签 powershell azure automation office365

为了轻松部署,我希望在 Office 365 Azure AD 中自动执行应用程序注册过程。申请证书并授予日历或事件目录或图表的某些权限的手动过程复杂且耗时。

我想简化整个注册和部署过程,以便过程顺利进行。

manual process link click here

最佳答案

我向新的 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/

相关文章:

java - 如何使用 selenium Web 驱动程序捕获服务器错误页面?

testing - 我如何生成一个包含功能配置和所有测试设置的脚本,以避免在每个类中编写设置方法

windows - 无法准备上下文 : unable to evaluate symlinks in Dockerfile path for windows 10

Powershell 忽略错误

powershell - 在使用 powershell 创建站点时,有没有办法告诉它何时创建并准备好使用?

Azure - web.config 中的 customErrors ="off"未在 Azure 应用程序(云服务)中显示详细错误

azure - Dynamics crm 365 获取 azure adal 授权码

powershell - 受域保护的 pfx 需要什么密码?

node.js - 如何修复端口 80 上的 Azure 应用服务错误?

excel - 如何将matlab答案导出到excel?