Connecting With Service Principal Using Connect-MSOLservice

旧街凉风 提交于 2019-12-23 16:18:54

问题


I am trying to use a service principal I have created in AzureAD to connect via a PowerShell script. I created the SP successfully, created the key, and also created a self signed cert and associated it with the account. I know how to use Connect-AzureAD but Connect-MSOLservice doesn't seem to allow me to enter the values needed.

I have tried using the standard connection string as you would with Connect-AzureAD but it doesn't seem to take the same input.

Connect-MsolService -TenantId "xxxx" -ApplicationId "xxxx" -CertificateThumbprint "xxxx"

I'm hoping someone can show me or point me in the direction of how to use the Connect-MSOLservice command using either the key or cert associated with the Service Principal.


回答1:


It's not possible to use service principal to Connect AAD via "Connect-MSOLservice"

Why:

Actually, MSOL Powershell is Office 365 Powershell. It's designed for managing O365 online services. Therefore, it could only be logged in via Office 365 users.

Hence, you cannot use Connect-MsolService with Guest users and service principals because they're not O365 users.



来源:https://stackoverflow.com/questions/55747310/connecting-with-service-principal-using-connect-msolservice

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!