如何使用Powershell在Azure AD中自动注册Office 365应用程序? [英] How to register an Office 365 Application in Azure AD automatically using powershell?

查看:95
本文介绍了如何使用Powershell在Azure AD中自动注册Office 365应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了易于部署,我想自动执行Office 365 Azure AD的应用程序注册过程.手动过程很复杂,而且要申请证书并在日历或活动目录或图上授予某些权限很耗时.

For easy deployment, I want to automate app registration process office 365 Azure AD. Manuel process is complex and time consuming to apply certificates and granting certain permissions on calendar or active directory or Graph.

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

I want to simplify the whole registration and deployment process so that process goes smoothly.

手动过程链接单击此处

推荐答案

我将以下命令发送到了新的Microsoft在线ServicePrincipal

I got the following command to new Microsoft online 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

已创建新的服务主体对象.

New service principal object created.

您需要连接到MsolService

You need to connect to MsolService

$Credential = Get-Credential
Connect-MsolService -Credential $Credential 

这篇关于如何使用Powershell在Azure AD中自动注册Office 365应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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