How to Connect SharePoint Online PowerShell?

December 15th, 2018 | Posted by admin in PowerShell | SharePoint Online | Tips & Tricks

To connect SharePoint Online, SharePoint Online Management PowerShell to be installed on the client machine and it can be downloaded from the below location.

https://www.microsoft.com/en-in/download/details.aspx?id=35588

Once the SharePoint Online Management Shell installed, you can launch the SharePoint Online Management Shell and connect the SPO service using below options

Option 1: Using User Name and Password

  1. Store the credential to a variable

$Cred = Get-Credential –UserName admin@superhybridcloud.onmicrosoft.com –Message “Type your Password”

  1. Connect SPO Service

Connect-SPOService –Url https://superhybridcloud-admin.sharepoint.com –Credential $Cred

Option 2: Using MFA

Note: Passing user name and password as mentioned on Option1 won’t show an option to pass the MFA challenge. So if MFA enabled, use this Option.

  1. Connect SPO Service

Connect-SPOService -Url https://superhybridcloud-admin.sharepoint.com

Browser will be launched and it will ask for credential. Once the authentication successful it will trigger MFA prompt, once the MFA challenge successful, you will be connected to SPO service.

Connecting SharePoint Online PowerShell is easy Right. J

You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.

Leave a Reply