Powershell | Connecting to Skype Online with MFA

We’ve recently migrated to Office 365 and have started to use Skype online as our new IM software. As with everything Microsoft, there allowing less and less configuration option through Group Policy and moving towards Intune and application specific policies through Azure itself. With Skype, Exchange, Security & Compliance and some of the other tools, these have to be configured through Powershell. Below are the steps i had to go through to remotely connect to Skype on 365.

  1. First of all download the Skype for Business Online Connector module from the MS site or click here 
  2. Ensure your machine can resolve the following name:
  3. If you can successfully resolve to an IP address then your good to go to move on
    A. If you can’t resolve the address you will need to do an NSLOOKUP for webdir.online.lync.com
    B. Add an entry into your hosts file using the IP address you just found but the following as the hostnamelyncdiscover.<O365domainname>

    The recommended way is that you add a CNAME record into your DNS
    CNAME              lyncdiscover.example.com       webdir.online.lync.com

  4. Now open an Administrative Powershell ISE window and input the following:
    Import-Module SkypeOnlineConnector
    $sfbSession = New-CsOnlineSession
    Import-PSSession $sfbSession
  5. You will be prompted to enter your full UID in the form of your email address
  6. After entering your email, you will be prompted to provide your multi factor authentication. If successful the commands will start to import and your good to go!

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.