Microsoft.IdentityModel.Clients.ActiveDirectory could not load

%3CLINGO-SUB%20id%3D%22lingo-sub-266784%22%20slang%3D%22en-US%22%3EMicrosoft.IdentityModel.Clients.ActiveDirectory%20could%20not%20load%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-266784%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3ESo%20i'm%26nbsp%3Bgetting%20this%20error%20in%20my%20PowerShell%26nbsp%3Blogs%20and%20i%20can't%20find%20a%20way%20to%20resolve%20it.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3E'Microsoft.IdentityModel.Clients.ActiveDirectory%2C%20Version%3D3.13.9.1126%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D31bf3856ad364e35'%20or%20one%20of%20its%20dependencies.%20The%20system%20cannot%20find%20the%20file%20specified.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3ECan%20I%20get%20any%20help%3F%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-266784%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-266854%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft.IdentityModel.Clients.ActiveDirectory%20could%20not%20load%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-266854%22%20slang%3D%22en-US%22%3E%3CP%3EMy%20script%20is%20for%20creating%20a%20Team%20in%20Microsoft%20team%2C%20it's%20executed%20in%20Azure%20function%20to%20be%20later%20executed%20trhough%26nbsp%3BMicrosoft%20Flow.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EI%20believe%20he%20called%20it%20in%20the%20credentials%20part%20here%20%3A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20908px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F55484i9EBA3513835FD318%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222018-10-04%2015_51_18-SPNextSiteCreation%20-%20QueueTriggerPowerShell3%20-%20Microsoft%20Azure.png%22%20title%3D%222018-10-04%2015_51_18-SPNextSiteCreation%20-%20QueueTriggerPowerShell3%20-%20Microsoft%20Azure.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-266852%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft.IdentityModel.Clients.ActiveDirectory%20could%20not%20load%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-266852%22%20slang%3D%22en-US%22%3EThat%20might%20be%20a%20good%20place%20to%20start.%20In%20honesty%2C%20I%20don't%20have%20much%20experience%20with%20using%20custom%20.NET%20libraries%20in%20PowerShell.%20Since%20a%20dependency%20couldn't%20be%20found%2C%20doing%20some%20investigating%20around%20that%20module%20would%20be%20good%20first%20step.%20What%20does%20this%20script%20do%2C%20and%20where%20is%20it%20being%20executed%20from%3F%20Where%20in%20the%20script%20does%20it%20call%20for%20the%20missing%20dependency%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-266846%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft.IdentityModel.Clients.ActiveDirectory%20could%20not%20load%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-266846%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%2C%3CBR%20%2F%3E%3CBR%20%2F%3ESorry%20i'm%20kinda%20lost%20about%20what%20i%20need%20to%20do%2C%20do%20i%20need%20to%20take%20one%20of%20those%20files%20%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20648px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F55482i5E2ED92125C5F365%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222018-10-04%2015_23_13-NuGet%20Package%20Explorer%20...s.ActiveDirectory%203.19.8.png%22%20title%3D%222018-10-04%2015_23_13-NuGet%20Package%20Explorer%20...s.ActiveDirectory%203.19.8.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EAnd%20put%20it%20in%20my%20Kudu%20modules%26nbsp%3Bfiles%20%3F%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F55483i75DE184C0712507E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222018-10-04%2015_23_43-Diagnostic%20Console.png%22%20title%3D%222018-10-04%2015_23_43-Diagnostic%20Console.png%22%20%2F%3E%3C%2FSPAN%3EThanks%20again%20for%20your%20help%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-266842%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft.IdentityModel.Clients.ActiveDirectory%20could%20not%20load%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-266842%22%20slang%3D%22en-US%22%3E%3CP%3EJames%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20attempted%20to%20install%20this%20package%20through%20a%20PowerShell%20console%20and%20the%20Package%20Manager%20that%20comes%20with%20VS2017%20but%20the%20package%20source%20isn't%20being%20resolved.%20I'm%20not%20sure%20why%20this%20is%20happening.%20However%20there%20should%20be%20a%20link%20on%20the%20right%20hand%20side%20of%20the%20page%20to%20download%20the%20package.%20Here%20is%20a%20direct%20link%20that%20might%20work%3A%26nbsp%3B%3CA%20title%3D%22Microsoft.IdentityModel.Clients.ActiveDirectory%20Library%22%20href%3D%22https%3A%2F%2Fwww.nuget.org%2Fapi%2Fv2%2Fpackage%2FMicrosoft.IdentityModel.Clients.ActiveDirectory%2F3.19.8%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EDownload%20Package%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-266832%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft.IdentityModel.Clients.ActiveDirectory%20could%20not%20load%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-266832%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3Ethank%20you%20for%20your%20response%2C%20how%20can%20i%20download%20it%20manually%20%3F%20in%20my%20powershell%26nbsp%3Bconsole%20%3F%26nbsp%3Bthanks.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-266825%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft.IdentityModel.Clients.ActiveDirectory%20could%20not%20load%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-266825%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20James%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20a%20link%20to%20the%20Microsoft.IdentityModel.Clients.ActiveDirectory%20library%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nuget.org%2Fpackages%2FMicrosoft.IdentityModel.Clients.ActiveDirectory%2F%23dotnet-cli%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nuget.org%2Fpackages%2FMicrosoft.IdentityModel.Clients.ActiveDirectory%2F%23dotnet-cli%26nbsp%3B%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20download%20the%20package%20manually%2C%20which%20if%20you%20open%20with%20the%20NuGet%20Package%20Explorer%20will%20give%20a%20list%20of%20dependencies%20for%20the%20library.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Deleted
Not applicable

Hi

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=3.13.9.1126, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Can I get any help? 

Thanks 

6 Replies
Highlighted

Hi James,

 

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

https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/#dotnet-cli  

 

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

 

 

Highlighted

Hi, 

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

Highlighted

James,

 

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

 

Highlighted

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 

 

Highlighted
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?
Highlighted

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