• 0

Calls to a Hybrid O365 Mailbox failing


Question

Hi all,

 

I'm getting to learn more into O365 and O365 programming and im coming across an issue when calling a hybrid mailbox

 

So the call made is

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <t:RequestServerVersion Version="Exchange2013_SP1" />
    <t:ExchangeImpersonation>
      <t:ConnectingSID>
        <t:SmtpAddress>mytestaddress@mytestaddress.com</t:SmtpAddress>
      </t:ConnectingSID>
    </t:ExchangeImpersonation>
  </soap:Header>
  <soap:Body>
    <m:CreateItem MessageDisposition="SaveOnly">
      <m:SavedItemFolderId>
        <t:DistinguishedFolderId Id="archivefolder" />
      </m:SavedItemFolderId>
      <m:Items>
        <t:Message>
          <t:Subject>Test message</t:Subject>
          <t:Body BodyType="HTML">This message was created on 6/9/2015 3:22:13 PM</t:Body>
          <t:Sender>
            <t:Mailbox>
              <t:EmailAddress>test.address@testdomain.com</t:EmailAddress>
            </t:Mailbox>
          </t:Sender>
          <t:From>
            <t:Mailbox>
              <t:EmailAddress>test.address@testdomain.com</t:EmailAddress>
            </t:Mailbox>
          </t:From>
        </t:Message>
      </m:Items>
    </m:CreateItem>
  </soap:Body>
</soap:Envelope>

But I get this error back

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Header>
        <h:ServerVersionInfo MajorVersion="15" MinorVersion="1" MajorBuildNumber="184" MinorBuildNumber="17" Version="V2_43" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
    </s:Header>
    <s:Body>
        <m:CreateItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
            <m:ResponseMessages>
                <m:CreateItemResponseMessage ResponseClass="Error">
                    <m:MessageText>The specified folder could not be found in the store.</m:MessageText>
                    <m:ResponseCode>ErrorFolderNotFound</m:ResponseCode>
                    <m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
                    <m:Items/>
                </m:CreateItemResponseMessage>
            </m:ResponseMessages>
        </m:CreateItemResponse>
    </s:Body>
</s:Envelope>

What am I not doing or not calling for a hybrid scenario ?

The code works fine where everything is in the cloud, so im a bit stumped on this one :( this had been working up until the O365 delegation changes, anyone come across anything similar ?

 

Thanks in advance
 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Thanks Jamie,

 

I changed it to archivemsgfolderroot as per the article linked and still get the same thing. Any way I can look in Office 365 to see the folder does exist ?

Link to comment
Share on other sites

  • 0

Hmmm.. that's odd.  When you say hybrid is the mailbox hosted on an on-premises Exchange Server or at Office 365?  I know there's several different configurations you can have that fall under the umbrella of "hybrid".  My knowledge of this SOAP approach is quite limited I should add, I'm coming at this from a .NET background using "conventional" MAPI and EWS calls!

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.