Contacts not showing in addressbook after importing

Contacts not showing in addressbook after importing

Post by Tm9zdHJ » Thu, 20 Oct 2005 22:08:07


we are experiencing problems with contacts after we imported them into
Exchange. They show up in the Contacts folder in Outlook but they don't
appear in the Addressbook. Only the manually created contacts are listed.
The code we use to import the contacts:

//prep request
HttpWebRequest Request = (HttpWebRequest)WebRequest.Create(Url + "/" + File);
Request.ContentType = "text/xml";
Request.Method = "PROPPATCH";

Request.Proxy = _Proxy;

//set named credentails
Request.Credentials = CredentialCache.DefaultCredentials;
CredentialCache Cache = new CredentialCache();
Cache.Add(new Uri(Url), _Security, _Credential);
Request.Credentials = Cache;

//encode the body using UTF-8
byte[] bytes = null;
bytes = Encoding.UTF8.GetBytes((string)XmlData);
Request.ContentLength = bytes.Length;

//get request stream.
Stream Data = Request.GetRequestStream();

//inject data into request
Data.Write(bytes, 0, bytes.Length);

//release connection

The data which is sent in the request (for testing purposes, we have a
testing program which imports 1 contact, so the data only contains 1 contact):

"<?xml version=\"1.0\" encoding=\"UTF-8\"?><d:propertyupdate
xmlns:mapi=\" {00062003-0000-0000-C000-000000000046}/\"
xmlns:g=\"urn:schemas:httpmail:\" xmlns:d=\"DAV:\"
xmlns:e=\" \"
xmlns:j=\"urn:schemas:mailheader:\" xmlns:x=\"xml:\"
xmlns:con=\" \"
Contact</c:cn><e:outlookmessageclass>IPM.Contact</e:outlookmessageclass><con:email1addrtype>SMTP</con:email1addrtype><con:email1emailaddress> XXXX@XXXXX.COM </con:email1emailaddress><g:subject>blabla</g:subject><c:fileas>TestContact</c:fileas><c:personaltitle>Mr.</c:personaltitle><con:email1originaldisplayname>John</con:email1originaldisplayname></d:prop></d:set></d:propertyupdate>"

We can force the contact to be listed in the addressbook, but therefore we
need to change the email-address or displayname manually. So, I think it
should have something to do with the resolving of the mail-address...

We are using C# as programming language, Exchange Server 2000 and Outlook


Contacts not showing in addressbook after importing

Post by Glen Scale » Fri, 21 Oct 2005 09:39:36

To make the contact appear in the address book view you need to set the

Also make sure you have set the urn:schemas:contacts:fileas and
urn:schemas:httpmail:subject properties as these also affect how the contact
will appear in the address book.



Contacts not showing in addressbook after importing

Post by Tm9zdHJ » Fri, 21 Oct 2005 16:50:01

len... this appears a partial solution.

I added the property below but then it didn't work either. So I looked
around on the internet looking for usages of emaillisttype property and found
a post on a forum (
where they use another property which needs to be set...
The property.

After adding this as well... the contact is listed in the addressbook.

But thanks for the answer Glen. Without this, I wouldn't have stumbled upon
the solution.

"Glen Scales [MVP]" wrote: