Connecting to SfBOL (MFA)

April 27, 2021 | by iaur | posted as Connect to M365 Services, PowerShell

Scenario

  • You need to connect to Skype for Business Online PowerShell
  • You are using a service account that is enabled with MFA

Prerequisite

Getting information about the SfBOL forest of the service

1. Connect to Microsoft Teams

2. Run the cmdlet below

##########################################################

Get-CsTenant | ft Identity

##########################################################

Take note of the 2 (sometimes 3) character value of DC=lyncXX001

Steps

1. Download this local SfBol PowerShell module (since it is no longer available in MSFT’s hosting)

from https://www.virustotal.com/

3. Run below cmdlet one line at a time

##########################################################

$AdminUserName = "YOUR_ADMIN_HERE"

$URI = "https://adminXXX.online.lync.com/OcsPowerShellLiveId"

#Note: $URI value of XXX is the value noted in Steps 2.

Import-Module -Name MicrosoftTeams

Import-Module "%TYPE_HERE_THE_DIRECTORY_OF_SkypeOnlineConnector%\SkypeOnlineConnector.psd1"

#"C:\Users\John\Desktop\SkypeOnlineConnector\SkypeOnlineConnector.psd1"

$sfbSession = New-CsOnlineSession -UserName $AdminUserName -OverridePowerShellUri "$URI"  -Verbose

Import-PSSession $sfbSession -AllowClobber

Enable-CsOnlineSessionForReconnection

##########################################################

Reference

Feedback or Help?

Should you have one, click here

Boring Ads. Pardon me :)