title: Outlook Redemption library - Accessing shared mailboxes / specific folders with a service account
body: <p>I’m converting an existing piece of code using Redemption (an MS Exchange library) to operate under a service account. The issue I’m having is that I’m unable to look up mail folders as I previously was.</p>
  
  <p>The first hurdle in moving to a service account was overcome by switching </p>
  
  <pre><code>_rdoSession.Logon() // &lt;- Which uses the account’s MAPI profile, and throws an exception under a service account 
  </code></pre>
  
  <p>To: </p>
  
  <pre><code>_rdoSession.LogonExchangeMailbox("", "mailserver.example.com"); 
  </code></pre>
  
  <p>The problem comes with trying to access specific folders. Previously I was able to use: </p>
  
  <pre><code>_session.GetFolderFromPath("\\\\Mailbox - Example shared mailbox\\Inbox\\FolderOne"); 
  _session.GetFolderFromPath("\\\\Mailbox - Example shared mailbox\\Inbox\\FolderTwo"); 
  </code></pre>
  
  <p>Under a service account, I can’t address shared mail accounts with that same syntax, as I get the error: </p>
  
  <pre><code>Could not open store "Mailbox – Example shared mailbox": Error in IMAPITable.FindRow: MAPI_E_NOT_FOUND 
  </code></pre>
  
  <p>Some Googling has shown the beginning step is to use: </p>
  
  <pre><code>_session.Stores.GetSharedMailbox("Example shared mailbox ")
  </code></pre>
  
  <p>I've verified this returns the correct shared mailbox object. </p>
  
  <p><strong>However</strong> - from there, there are no search methods. I can try my luck with building new code to navigate the folder structure from the <em>.RootFolder</em> property, but this seems like a hack.</p>
  
  <p><em>How should I be accessing specific folders in a shared mailbox, run under a service account in Redemption?</em> </p>