All Questions
Tagged with principalsearcher userprincipal
6 questions
0
votes
1
answer
166
views
Using PrincipalSearcher to find users matching pattern
I have a somewhat particular situation I couldn't find answers to through google.
I need to query my active directory for users whose SAMAccountName fits a particular pattern (3 letters followed by 4 ...
0
votes
0
answers
79
views
Is there a way of searching for a list of users on AD who have not logged on in the last year?
I am trying to find a way of getting a list of UserPrincipal objects that have not logged in for a year. There is a Last Logon property on the object, but I can't figure out how to do a less than ...
1
vote
1
answer
535
views
Find if Active Directory is Enabled/Disabled with Email
I'm trying to find if a user has an Active Directory account by searching with their email address and checking the Enabled property (if I return Enabled as true - run code, if I return false - run ...
1
vote
1
answer
7k
views
Complex Search Filtering with PrincipalSearcher
I am searching in Active Directory for specific SamAccountName values using the PrincipalSearcher object because I want to return UserPrincipal's. I was wondering how I can apply two filters to that ...
6
votes
2
answers
5k
views
Extend UserPrincipal class
I do the extension of the UserPrincipal class to retrieve some missing properties that i need:
[DirectoryObjectClass("user")]
[DirectoryRdnPrefix("CN")]
class UserPrincipalExt : UserPrincipal
{
...
1
vote
2
answers
5k
views
Search Users in Active Directory based on First Name, Last Name and Display Name
I trying to search my organization Active directory for users.
If the FirstName or LastName or DisplayName matches a particular string value, it should return the users.
My Code:
// create your ...