none
Access address list using EWS Manage API 1.1 RRS feed

  • Question

  • Hi,

    I'm new to development in Exchange so really hoping some can help.

    We are using Exchange 2010.  We have an address list (under other Address List in Outlook) called Business Contacts where we want to create our clients' contact information with external emails.  Is there a way to access this address list and create new contacts using EWS Managed API 1.1 and VB.NET?

    I've successfully created a contact under a user's personal contact but not sure how to do the above.  I can't find any documentation or articles about this.  The documentation and articles that I've searched are confusing due to the different terminologies being used, for instance is Distribution List the same as Address List in Exchange?  In the API documentation does ContactsFolder class refer to Address List?

    Appreciate any help or info.

    Thank you.

    ml99
    ml99
    Saturday, January 15, 2011 12:24 AM

Answers

All replies

  • EWS is very limited into what it can do around address lists and Active Directory you can only use EWS to create Mapi contacts eg those contacts that exists in a contacts folder in a Mailbox or a public contacts Folder. The only address list functions EWS has are resolve functions so it can resolve the name of contact from partial information but it can't enumerate the Global Address list for instance. For this type of thing you should be use LDAP to query Active Directory directly this is the same if you are trying to create contacts within Active Directory you should be use the Exchange Management Shell New-MailContact cmdlet which is the only supported method of creating a mail-enabled contact in AD http://technet.microsoft.com/en-us/library/bb124519%28EXCHG.80%29.aspx.

    Cheers
    Glen

    Monday, January 17, 2011 6:37 AM
  • Hi Glen,

    Thanks for your prompt response.  I was able to query the contacts using LDAP!  :-)

    Now, I'm trying to create the contact as you suggested using the Exchange Management Shell.  I'm trying to call the cmdlet as shown here http://msdn.microsoft.com/en-us/library/bb332449(v=exchg.80).aspx I followed the instructions, however, I'm  getting the following error

    System.Management.Automation.PSArgumentException: No snap-ins have been registered for Windows PowerShell version 2.

    I'm using Visual Studio 2010 on Windows 7.  Do I need to install anything else on my machine? I've done many searches but can't seem to find a solution or proper information on this.

    Again, would appreciate any help or info.

    Thank you.
    ml99


    ml99
    Monday, January 17, 2011 10:12 PM
  • That link your using is for 2007 on 2010 you should be using remote powershell see http://msdn.microsoft.com/en-us/library/ff326159(v=exchg.140).aspx this thread might also be usefull http://social.technet.microsoft.com/Forums/en/exchangesvrdevelopment/thread/d396c5ec-48ee-402c-b072-be8a0f46dc2f

    Cheers
    Glen

    • Marked as answer by ml99 Thursday, January 20, 2011 1:39 AM
    Tuesday, January 18, 2011 2:32 AM
  • Hi Glen,

    Thanks so much!! That really helped and I am able to create a mail contact.

    ml99


    ml99
    Thursday, January 20, 2011 1:41 AM