none
Find Shared Contact Folders/Mailboxes using EWS RRS feed

  • Question

  • I'm trying to write a .net outlook vb addin that will find all Contact folders on both the account of the user that is logged in to the machine, and any Contact folders that have been shared with that user. I can get to the Contacts of the user that is logged into the machine, but I can't find any examples that will get me the shared Contacts folders. I do not see the shared Contact folders with the existing code that I have. This is for Outlook 2019 on-prem, using Exchange Web Services. Thanks!
    Friday, April 3, 2020 8:28 PM

All replies

  • Hi,

    Thanks for visiting our forum, here we mainly focus on general issues about Outlook desktop client but your question is more related to Outlook for developer . So I'll move your thread to the dedicated forum for Outlook for developer.

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thanks for your understanding and hope your question will be resolved soon.

    Regards,

    Aidan Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Monday, April 6, 2020 1:39 AM
  • If you are writing  VB/Net COM addin, why do you need to use EWS? Use Application.Session.GetSharedDefaultFolder.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!


    Monday, April 6, 2020 4:59 AM
  • Hi Dmitry - We're currently reading the local outlook profile. We have 5 offices and our exchange server is in 1 location. We don't want to create traffic over the WAN. Is there a way to do what we want with EWS? Or another way?
    Monday, April 6, 2020 3:09 PM
  • Anyone have any thoughts on this? If it's not possible, then let me know what my options are.
    Friday, April 10, 2020 5:07 PM
  • I am not sure what you mean by "We don't want to create traffic over the WAN" - that is exactly what your EWS code would do, would it not?

    If your Outlook profile is cached, and the mailbox in question is already in the profile, Application.Session.GetSharedDefaultFolder will returned the cached folder, whcih is exactly what you want.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!


    Friday, April 10, 2020 5:11 PM
  • That's what I was told by our Network Admin. If doing what we would like to do using EWS is not possible(and I haven't found anything yet that says it is), please let me know so we can drop this and continue to use what we are doing now which is what you suggested. Thanks!
    Friday, April 10, 2020 5:27 PM
  • Your network admin told you that EWS calls do not go through the local network but calls to the local OST file do? Your admin is misinformed, to put it very mildly.

    Of course you can do EWS from a COM addin (it is just an HTTP call after all), but why woudl you want to? It will be your responsibility to authenticate the user as OOM won't let you access its OAuth tokes that it uses internally.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Friday, April 10, 2020 6:54 PM