Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

.net directorysearcher get manager accountname

if (userAccount.Properties["manager"].Value != null)
{
  DirectorySearcher search2 = new DirectorySearcher(domain.GetDirectoryEntry())
  {
    Filter = string.Format("(distinguishedName={0})", userAccount.Properties["manager"].Value)
  };
  search2.PropertiesToLoad.Add("displayName");
  search2.PropertiesToLoad.Add("mail");
  search2.PropertiesToLoad.Add("manager");
  DirectoryEntry mgrAcc = search2.FindOne()?.GetDirectoryEntry();
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: convert foreach to linq c# 
Csharp :: black lives matter update arsenal 
Csharp :: population of the world 
Html :: fevicon 
Html :: html yen symbol 
Html :: html empty character 
Html :: starter data jpa maven dependency 
Html :: td align top 
Html :: add mailto in html 
Html :: bootstrap 4 cdn 
Html :: no follow no index 
Html :: remove border in ion item 
Html :: disable-html-form-input-autocomplete-autofill 
Html :: tabulation html 
Html :: alphanumeric input 
Html :: html img size 
Html :: how to install jquery 
Html :: open link in new tab html 
Html :: prevent webpage zooming in mobile 
Html :: sample html file 
Html :: make text vertical align middle in table bootstrap 
Html :: justify-content-center react bootstrap 
Html :: js making input non typeable 
Html :: div contenteditable onchange angular 
Html :: html link 
Html :: a tah 
Html :: bs4 monospace 
Html :: open anchor tag in new tab 
Html :: ion-button outline 
Html :: how to get value of textbox in javascript from html 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =