Linger.Ldap.ActiveDirectory
0.7.2
.NET 8.0
This package targets .NET 8.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Linger.Ldap.ActiveDirectory --version 0.7.2
NuGet\Install-Package Linger.Ldap.ActiveDirectory -Version 0.7.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Linger.Ldap.ActiveDirectory" Version="0.7.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Linger.Ldap.ActiveDirectory" Version="0.7.2" />
<PackageReference Include="Linger.Ldap.ActiveDirectory" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Linger.Ldap.ActiveDirectory --version 0.7.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Linger.Ldap.ActiveDirectory, 0.7.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Linger.Ldap.ActiveDirectory@0.7.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Linger.Ldap.ActiveDirectory&version=0.7.2
#tool nuget:?package=Linger.Ldap.ActiveDirectory&version=0.7.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Linger.Ldap.ActiveDirectory
A comprehensive .NET library for Active Directory LDAP operations, providing simplified access to AD user information and authentication.
Features
User Management
- User authentication and validation
- Detailed user information retrieval
- User search capabilities
- Group membership information
User Information Categories
- Basic identification (username, display name, UPN)
- Personal information (first name, last name, initials)
- Contact details (email, phone numbers, addresses)
- Organization info (department, title, employee ID)
- System attributes (workstations, profile paths)
- Security settings (account status, password info)
Supported Frameworks
- .NET 9.0
- .NET 8.0
- .NET 6.0
- .NET Standard 2.0
- .NET Framework 4.6.2
Installation
From Visual Studio
- Open the
Solution Explorer
. - Right-click on a project within your solution.
- Click on
Manage NuGet Packages...
. - Click on the
Browse
tab and search for "Linger.Ldap.ActiveDirectory". - Click on the
Linger.Ldap.ActiveDirectory
package, select the appropriate version and click Install.
Package Manager Console
PM> Install-Package Linger.Ldap.ActiveDirectory
.NET CLI Console
> dotnet add package Linger.Ldap.ActiveDirectory
Usage Examples
Basic Configuration
var config = new LdapConfig
{
Url = "ldap.company.com",
Domain = "COMPANY",
SearchBase = "DC=company,DC=com",
Security = true,
Credentials = new LdapCredentials { BindDn = "serviceAccount", BindCredentials = "password" }
};
User Authentication
using var ldap = new Ldap(config);
if (ldap.ValidateUser("username", "password", out var userInfo))
{
Console.WriteLine($"User authenticated: {userInfo.DisplayName}");
Console.WriteLine($"Email: {userInfo.Email}");
Console.WriteLine($"Department: {userInfo.Department}");
}
Finding Users
using var ldap = new Ldap(config);
// Find specific user
var user = ldap.FindUser("username");
if (user != null)
{
Console.WriteLine($"Name: {user.DisplayName}");
Console.WriteLine($"Email: {user.Email}");
Console.WriteLine($"Title: {user.Title}");
}
// Search users with pattern
var users = ldap.GetUsers("john*");
foreach (var foundUser in users)
{
Console.WriteLine($"Found: {foundUser.DisplayName}");
Console.WriteLine($"Groups: {string.Join(", ", foundUser.MemberOf ?? Array.Empty())}");
}
Available User Properties
Identification
- DisplayName
- SamAccountName
- UserPrincipalName (UPN)
- DistinguishedName (DN)
Personal Information
- FirstName
- LastName
- Description
- Initials
Contact Information
- TelephoneNumber
- Mobile
- HomePhone
- Fax
- IpPhone
- WebPage
Organization Details
- Company
- Department
- Title
- Manager
- EmployeeId
- EmployeeNumber
Address Information
- Street
- City
- State
- PostalCode
- Country
- PostOfficeBox
System Information
- UserWorkstations
- ProfilePath
- HomeDrive
- HomeDirectory
- WhenCreated
Security Information
- Status (Enabled/Disabled/Locked/Expired)
- AccountExpires
- PwdLastSet
- PwdExpirationLeftDays
- MemberOf (Group memberships)
Requirements
- Windows operating system (uses System.DirectoryServices.AccountManagement)
- Appropriate Active Directory permissions
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a Pull Request
License
This project is licensed under the MIT License.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Linger.Ldap.Contracts (>= 0.7.2)
- Linger.Utils (>= 0.7.2)
- Microsoft.Extensions.Options (>= 9.0.5)
- System.DirectoryServices (>= 9.0.5)
- System.DirectoryServices.AccountManagement (>= 9.0.5)
-
net8.0
- Linger.Ldap.Contracts (>= 0.7.2)
- Linger.Utils (>= 0.7.2)
- Microsoft.Extensions.Options (>= 9.0.5)
- System.DirectoryServices (>= 9.0.5)
- System.DirectoryServices.AccountManagement (>= 9.0.5)
-
net9.0
- Linger.Ldap.Contracts (>= 0.7.2)
- Linger.Utils (>= 0.7.2)
- Microsoft.Extensions.Options (>= 9.0.5)
- System.DirectoryServices (>= 9.0.5)
- System.DirectoryServices.AccountManagement (>= 9.0.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Linger.Ldap.ActiveDirectory:
Package | Downloads |
---|---|
Linger.Ldap.AspNetCore
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.8.5-preview | 57 | 8/31/2025 |
0.8.4-preview | 262 | 8/25/2025 |
0.8.3-preview | 123 | 8/20/2025 |
0.8.2-preview | 167 | 8/4/2025 |
0.8.1-preview | 113 | 7/30/2025 |
0.8.0-preview | 493 | 7/22/2025 |
0.7.2 | 150 | 6/3/2025 |
0.7.1 | 153 | 5/21/2025 |
0.7.0 | 155 | 5/19/2025 |
0.6.0-alpha | 159 | 4/28/2025 |
0.5.0-alpha | 155 | 4/10/2025 |
0.4.0-alpha | 154 | 4/1/2025 |
0.3.3-alpha | 158 | 3/19/2025 |
0.3.2-alpha | 153 | 3/17/2025 |
0.3.1-alpha | 148 | 3/16/2025 |
0.3.0-alpha | 212 | 3/6/2025 |
0.2.0-alpha | 107 | 2/9/2025 |
0.1.2-alpha | 101 | 12/17/2024 |
0.1.1-alpha | 85 | 12/17/2024 |
0.1.0-alpha | 90 | 12/6/2024 |
0.0.2-alpha | 91 | 12/6/2024 |
0.0.1-alpha | 97 | 11/27/2024 |