Microsoft.IdentityModel.Clients.ActiveDirectory could not load

Not applicable


So i'm getting this error in my PowerShell logs and i can't find a way to resolve it.

'Microsoft.IdentityModel.Clients.ActiveDirectory, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Can I get any help? 


7 Replies

Hi James,


Here is a link to the Microsoft.IdentityModel.Clients.ActiveDirectory library:  


You can download the package manually, which if you open with the NuGet Package Explorer will give a list of dependencies for the library.




thank you for your response, how can i download it manually ? in my powershell console ? thanks. 



I've attempted to install this package through a PowerShell console and the Package Manager that comes with VS2017 but the package source isn't being resolved. I'm not sure why this is happening. However there should be a link on the right hand side of the page to download the package. Here is a direct link that might work: Download Package


Thank you,

Sorry i'm kinda lost about what i need to do, do i need to take one of those files :

2018-10-04 15_23_13-NuGet Package Explorer ...s.ActiveDirectory 3.19.8.png

And put it in my Kudu modules files ? 2018-10-04 15_23_43-Diagnostic Console.pngThanks again for your help 


That might be a good place to start. In honesty, I don't have much experience with using custom .NET libraries in PowerShell. Since a dependency couldn't be found, doing some investigating around that module would be good first step. What does this script do, and where is it being executed from? Where in the script does it call for the missing dependency?

My script is for creating a Team in Microsoft team, it's executed in Azure function to be later executed trhough Microsoft Flow. 

I believe he called it in the credentials part here :2018-10-04 15_51_18-SPNextSiteCreation - QueueTriggerPowerShell3 - Microsoft Azure.png

Use a PS5 task, AzureAD module has always been busted in PS7 -

no one seems to be resolving