Tom Talks Microsoft Teams and Microsoft 365 Collaboration news and opinions

Connecting to Skype for Business Online PowerShell from Windows 7

Windows 7 x64:



Without the AzureAD Module I got an error:

Could not load file or assembly ‘Microsoft.IdentityModel.Clients.ActiveDirectory, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file
specified.  at New-CsOnlineSession, C:\Program Files\Common Files\Skype for Business Online\Modules\SkypeOnlineConnector\SkypeOnlineConnectorStartup.psm1: line 123
at New-O365Session

Great pointer blog post from Curtis, you should check out his blog:

I couldn’t get his solution to work (probably something I was doing wrong:


Same issue in CMD


However that gave me the clue I needed and installed the AzureADPreview module:


Which then worked:


About the author

Tom Arbuthnot

A Microsoft MVP and Microsoft Certified Master, Tom Arbuthnot is Principal Solutions Architect at Microsoft Collaboration specialists Modality Systems.

Tom stays up to date with industry developments and shares news and his opinions on his blog, Microsoft Teams Podcast and email list. He is a regular speaker at events around the world.

1 comment

Leave a Reply

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

  • Hi Tom,

    I was just trying to run my ps1 scripts using Visual Code and got confused whith that error message. I mean, I was able to connect to S4B module using ISE and the very PowerShell, so I wasn’t able to find the problem.

    Thanks a lot for sharing that easy and very effective solution.

    Mateus Alves (brazil)

Tom Talks Microsoft Teams and Microsoft 365 Collaboration news and opinions