2

I am getting the following error when trying to load the following namespace

Microsoft.IdentityModel.Clients.ActiveDirectory

Error - The type or namespace IdentityModel does not exist in the namespace Microsoft.

Running on .NET Framework 4.6.

Package for Microsoft.IdentityModel.Clients.ActiveDirectory v3.19.2

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • 2
    Your question is confusing; one doesn't load a namespace. Have you included the Microsoft.IdentityModel.Clients.ActiveDirectory NuGet package (https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/). Did you read the note about using Microsoft.Identity.Client instead. Please include a description of your environment (.NET version, related packages include (and whether you are using packages.config or not)) – Flydog57 Oct 24 '22 at 02:31

1 Answers1

1

Try to install the Microsoft.Identity.Client package version 4.47.2 in Visual studio 2019 using the nuget package manager under tools shown below and Microsoft.IdentityModel.Clients.ActiveDirectory is deprecated:

enter image description here

Install the package and check in the console output whether it is installed successfully or not as shown below:

enter image description here

Now, we can use that package in the code.

RKM
  • 1,234
  • 1
  • 4
  • 9