Mock Function call to force loading an assembly - how elegant!

New version of Microsoft.IdentityModel.Clients.ActiveDirectory (ADAL.NET) is out – good time to update!

There’s now a new version of the assembly Microsoft.IdentityModel.Clients.ActiveDirectory available – plenty of reasons to update right away! Let me offer you one hot take on the matter since the earlier 3.x -versions of the package had some issues.

Why bother updating?

In an earlier post I described an issue I had with Microsoft.IdentityModel.Clients.ActiveDirectory.Platform not getting copied during the build in a referencing project. In 3.17.0, which the developers published this month, they fixed the issue! The new package actually contains separate DLLs for different platforms.

In essence this means, that from C#/.NET -developer’s standing point, the team has assimilated the Microsoft.IdentityModel.Clients.ActiveDirectory.Platform assembly, among other platform DLLs, into Microsoft.IdentityModel.Clients.ActiveDirectory package itself. Hence, you’ll need no more funky hacks to ensure, that Visual Studio will end up copying the DLLs during the build! 🙂

What’s new with Microsoft.IdentityModel.Clients.ActiveDirectory 3.17?

Release notes say, that 3.17 introduces these changes:

  • Write more efficient applications, tolerant to Azure AD throttling.
  • Force end users of your apps to choose an identity even when s/he is logged-in.
  • Process more effective conditional access.

While looking at the DLLs through Object Browser, it seems like they’ve added a new namespace “Native”, which seems like its more or less moved from the Playtform dll. In essence, that namespace likely now contains the functionality that was in Platform dll before.. Therefore, you should not need the Platform dll anymore!

Microsoft.IdentityModel.Clients.ActiveDirectory DLL in Visual Studio Object Browser
Microsoft.IdentityModel.Clients.ActiveDirectory DLL in Visual Studio Object Browser

Disclaimer: I’ve got nothing to do with the development team. I’m just happy the team was able to push this update out – so I thought I should maybe give them some appreciation for their work. Good job, folks! 🙂

To find out more, check this: https://azure.microsoft.com/en-us/blog/adal-net-3-17-0-released-2/

The following two tabs change content below.

Antti K. Koskela

Solutions Architect / Escalations Engineer at Koskila / Norppandalotti Software / Valo Solutions
Antti Koskela is a proud digital native nomadic millenial full stack developer (is that enough funny buzzwords? That's definitely enough funny buzzwords!), who works as a Solutions Architect for Valo Intranet, the product that will make you fall in love with your intranet. Working with the global partner network, he's responsible for the success of Valo deployments happening all around the world. He's been a developer from 2004 (starting with PHP and Java), and he's been bending and twisting SharePoint into different shapes since MOSS. Nowadays he's not only working on SharePoint, but also on .NET projects, Azure, Office 365 and a lot of other stuff. This is his personal professional (e.g. professional, but definitely personal) blog.

2 thoughts on “New version of Microsoft.IdentityModel.Clients.ActiveDirectory (ADAL.NET) is out – good time to update!

  1. Interesting post … but I’m still getting the “Could not load file or assembly Microsoft.IdentityModel.Clients.ActiveDirectory.Platform” with 3.17.1 … where exactly do you see this assembly so it’s referenced? It’s not part of the nuget package. Thoughts? I’ve never had something this annoying with MS code before

    1. Hi Tom,

      Sorry for the late response! It’s an annoying issue, for sure, but should’ve been fixed with just updating the Microsoft.IdentityModel.Clients.ActiveDirectory -nuget package, as the functionality that used to be in the Platform-package should now be in the core dll itself!

      Looking at the dlls via object browser shows, that they’ve added the .Native -namespace, which likely contains whatever was in the Platform -dll before. I’ve added this info (or, you know, a screenshot) to the blog post!

Let me know your thoughts!