CodeNode.ActiveDirectory
1.0.3
dotnet add package CodeNode.ActiveDirectory --version 1.0.3
NuGet\Install-Package CodeNode.ActiveDirectory -Version 1.0.3
<PackageReference Include="CodeNode.ActiveDirectory" Version="1.0.3" />
paket add CodeNode.ActiveDirectory --version 1.0.3
#r "nuget: CodeNode.ActiveDirectory, 1.0.3"
// Install CodeNode.ActiveDirectory as a Cake Addin #addin nuget:?package=CodeNode.ActiveDirectory&version=1.0.3 // Install CodeNode.ActiveDirectory as a Cake Tool #tool nuget:?package=CodeNode.ActiveDirectory&version=1.0.3
This library has Active directory specific actions to find users, group on various search parametes.
I have provided link of my blog as Project-Site and you can find complete details of library and code repository location of github from my blog.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net40 is compatible. net403 was computed. net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Added some new methods.
Added support to get user informatoin for window app also. Some methods are as :
A small code snippet :
// get user ad id for hosted web app with window authentication enabled
var currentWenUserAdId = Helper.GetCurrentWebUserAdId();
// get current win user for in domain window app, use this username for further with ActiveDirectoryManager
var currentWinAppuserName = Helper.GetCurrentUserNameForWindowApp();
var manager = new ActiveDirectoryManager();
var webAppUser = manager.GetCurrentWebUser();
var winAppUser = manager.GetCurrentWindowUser();
// get list of groups user belongs to
var userGroups = manager.GetUserGroupNames(currentWinAppuserName).ToList();
// get list of authorization groups of user
var athGrps = manager.GetUserAuthorizationGroupNames(currentWinAppuserName).ToList();
// check user belongs to particular group
var isUserGrpMember = manager.IsUserGroupMember(currentWinAppuserName, "AnyGroupName");