Exchange public folders

  • I really need to extract contacts from public folders. I have been working with it for 3 days now, and I am still stuck.

    I use ESW and c# in a Script task, but I am not getting any closer.

    Any help? Links? Or other ressources that I can use?

    Søren,
    MCITP SQL 2008 (administration / programming), MCITP SQL 2005 (BI), MCT

  • Could you provide a link to ESW?

    CEWII

  • You might want to take a look at the Exchange OLE DB Provider... Here's a link from BOL that has code for accessing contacts...

    http://msdn.microsoft.com/en-us/library/ms191461.aspx

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • Luke L (3/1/2010)


    You might want to take a look at the Exchange OLE DB Provider... Here's a link from BOL that has code for accessing contacts...

    http://msdn.microsoft.com/en-us/library/ms191461.aspx

    -Luke.

    This line on that page limits the usefulness:

    Web Stores located in other computers cannot be accessed by using the OLE DB Provider for Exchange.

    As I read that your app MUST be on the exchange server and not on some other box.

    Do you read it differently?

    CEWII

    P.S. And it explicitly references Exchange 2000..

  • My understanding was that you had to have SQL installed on the same machine as the web store. not the entire application... But yes it does appear that this references Exchange 2000, I'm not sure it would work correctly with Exchange 07 because you may run into 32/64 bit issues, but it might work just the same. It has been a while since I have seen this working, a number of employers ago we had this up and running... This just happened to be the suggested MS solution from BOL, so it was the one I posted, not knowing what the abbreviation the OP had posted stood for.

    Additionally, I would think that you might be able to connect to exchange via any one of the numerous LDAP query tools out there, or even look into using the ISSAM providers for the JEt database.

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • I know you can access the message store from OWA, I can't find the libraries to do this though right now. I don't see what this has to be so darn cryptic, nobody wants to read from an Exchange Server programatically? Really?

    CEWII

  • If it was easy to do and you could get even one tiny back door to a publicly hosted OWA server I'd think this would be just the type of thing someone with more nefarious purposes might want to do. Once I have that access I have access to all of your email, confidential company data etc... Once you go down that hole you'd be surprised what is lurking.

    But sadly I agree, reading from Exchange pragmatically could be a lot easier. I thought that was the whole idea behind the OLEdb Provider. It's a shame they didn't keep it up...

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • Heh, after re-reading your post I see that it was sarcasm, sorry not enough coffee yet this morning...

    Yeah, you'd think that a lot more people would want to read an exchange store programatically... I know there are a number of third party apps out there that do it, some using event sinks and a variety of other methods, you'd think ease of interaction would be higher up on the priority list...

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • Luke L (3/2/2010)


    If it was easy to do and you could get even one tiny back door to a publicly hosted OWA server I'd think this would be just the type of thing someone with more nefarious purposes might want to do. Once I have that access I have access to all of your email, confidential company data etc... Once you go down that hole you'd be surprised what is lurking.

    Hold on Luke. That comes accross as scaremongering.. No matter what method you use, you have access to what ever the credentials have access to. Also, not all OWA is external access, a company I know well has OWA but you have to be inside their network to use it. I will say it is VERY common to be available outside the network in MOST companies. But where I'm going is that if your user has access to a lot then when that user is used to access the Exchange Data Store, that user still has access. So I'm not seeing any real difference between a program and a user. You see my point?

    CEWII

  • It wasn't really meant as scaremonering, just some thoughts from someone who did a stint as a security researcher for a while. It seems to me that you were asking that no one would want the data anyhow. After I'd already posted my reply that you I realized you were being sarcastic. For that I apologise, but you do bring up some pretty important points.

    Yes most Companies provide OWA access to external entities. In order to do this securely most companies provide that on a separate box that communicates to backend exchange data stores for security. That way if you take over my OWA server you don't necessarily get my mail.

    However, typically when you talk about programatically accessing an exchange datastore, you are doing it with more than general user rights, because you want to view more than one mailbox etc. unless you are getting those credentials from a user and accessing their mailbox specifically, but isn't that what outlook, OWA, ical and vcards are for? It stands to reason that elevated permissions might be used to access multiple mailboxes and that requires some thought prior to forging ahead and trying to just "make it work". That's all I was trying to say. To me the difference between a user and a program is that if a user wants to screw up his own mailbox, fine but if the application hoses the entire datastore you're in a much larger amount of hot water.

    In the OP's question he just wants to read from Contacts lists in the public folder store. You can create a user that only has read access to that folder, and that's no big deal, unless that list is itself confidential company information(vendors, clients etc), or worse, is Personally identifiable Information governed by any number of international, federal and local laws.

    I'm by no means saying hey don't do this, I'm just trying to say take a moment to think about it prior to forging ahead.

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • Luke L (3/2/2010)


    It wasn't really meant as scaremonering, just some thoughts from someone who did a stint as a security researcher for a while. It seems to me that you were asking that no one would want the data anyhow. After I'd already posted my reply that you I realized you were being sarcastic. For that I apologise, but you do bring up some pretty important points.

    Yes I was being sarcastic, I'm sorry that wasn't clear.

    However, typically when you talk about programatically accessing an exchange datastore, you are doing it with more than general user rights, because you want to view more than one mailbox etc.

    When I viewed this I was talking about a single users access. In *most* of the cases I can think of I want to work with a single mailbox(calendar/contacts/etc), additional rights could be granted but certainly not anything like superuser, maybe allowing a certain user to read another mailbox, which you have the ability to do through outlook anyway.

    It stands to reason that elevated permissions might be used to access multiple mailboxes and that requires some thought prior to forging ahead and trying to just "make it work".

    I'm not talking about elevated permissions.

    To me the difference between a user and a program is that if a user wants to screw up his own mailbox, fine but if the application hoses the entire datastore you're in a much larger amount of hot water.

    Which is why I wouldn't utilize a user with a lot of rights. Also, I'm not sure how much damage OWA would let you do, I'm sure you could hose up a mailbox pretty good, but it would take some effort to hose up a server's worth.

    In the OP's question he just wants to read from Contacts lists in the public folder store. You can create a user that only has read access to that folder, and that's no big deal, unless that list is itself confidential company information(vendors, clients etc), or worse, is Personally identifiable Information governed by any number of international, federal and local laws.

    Customer/client data is usually all that is considered really confidential. Not to say your vendors aren't important but I've not seen laws that protect your vendors.

    CEWII

  • info-656071 (3/1/2010)


    I really need to extract contacts from public folders. I have been working with it for 3 days now, and I am still stuck.

    I use ESW and c# in a Script task, but I am not getting any closer.

    Any help? Links? Or other ressources that I can use?

    So back to the issue at hand, I'm guessing ESW is Exchange Web Services? I'd forgotten about the Exchange Team's blog for a while and after this post I ran through their tools section. Looks like they released a new version of ESW along with E2010. Apparently there is a new security model too. With the old version you needed to be local to the exchange server. With the new version you can be remote. http://msexchangeteam.com/archive/2009/04/21/451126.aspx

    Also here's a link to some sample code using powershell if that might be of use as well.

    http://msexchangeteam.com/archive/2009/11/02/453016.aspx

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • >Activate Sarcasm Mode

    Sarcasm Model Activated, proceed with sarcastic conversation.

    It took to Exchange 2010 to do this? I mean just off the top of my head I can name 4 versions of exchange.. I am just amazed it took this long.

    >Deactivate Sarcasm Mode

    Sarcasm Mode Deactivated, proceed with normal conversation.

    CEWII

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic. Login to reply