![]() Search.Filter = String.Format("(&(objectCategory=person)(objectClass=user)(givenname=*))", sname, fname) public static List GetActiveDirectoryData(string sname, string fname)ĭirectorySearcher search = new DirectorySearcher() also, regarding another issue you wrote in your question, entering the user and password is not needed because authentication was already maid when the user authenticated to windows. Note: ActiveDirectoryEntity us a class of mine. Here is an example that I wrote in my project to get user data including email by the first name and last name from AD. The relevant namespace is: System.DirectoryServices ![]() Use the active directory instead of EWS to get network users data, including email address. What should I be using to achieve this? Any push in the right direction would be greatly appreciated. I did try to use this: however ExchangeVersion only has options up to Exchange 2013. I would also like any authentication done automatically based on domain authentication with the currently logged in user instead of requiring the user to input a password. I have looked into a bunch of documentation for things like EWS however I have not found reference for EWS to be guaranteed working with Exchange 2019. This is unnecessary and my only thought of how to stop this form happening is instead of using Outlook itself, get the contacts from the Exchange Server. ![]() The problem with this approach is that whenever a user opens the application and Outlook is not already open, an Outlook popup appears asking the user to Allow or Deny the application's access to Outlook contacts. Items ContactItems = ContactsFolder.Items įoreach (.ContactItem item in ContactItems) MAPIFolder ContactsFolder = NameSpace.GetDefaultFolder(.OlDefaultFolders.olFolderContacts) ![]() NameSpace NameSpace = app.GetNamespace("MAPI") I need to get the currently logged in user's contacts to use in the application and I am currently getting the contacts with the following: .Application app = new .Application() I am currently developing an application to be used internally only at work. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |