[SalesForce] Retrieving Shared Data Extension folders using the SOAP API

I'm using the SOAP envelope below to retrieve Data Extension folders and subfolders in a Business Unit, which works fine. However, it doesn't return any folders that exist in the Shared Data Extensions folder. Does anyone know if this is possible?

<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
   <s:Header>
      <a:Action s:mustUnderstand="1">Retrieve</a:Action>
      <a:MessageID>urn:uuid:7e0cca04-57bd-4481-864c-6ea8039d2ea0</a:MessageID>
      <a:ReplyTo>
         <a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
      </a:ReplyTo>
      <a:To s:mustUnderstand="1">{{soapEndPoint}}/Service.asmx</a:To>
      <fueloauth xmlns="http://exacttarget.com">{{accessToken}}</fueloauth>
   </s:Header>
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <RetrieveRequest>
                <ObjectType>DataFolder</ObjectType>
                <Properties>ID</Properties>
                <Properties>Name</Properties>
                <Properties>ContentType</Properties>
                <Properties>ParentFolder.Name</Properties>
                <Properties>ObjectID</Properties>
                <Properties>ParentFolder.ObjectID</Properties>
                <ns1:Filter
                     xmlns:ns1="http://exacttarget.com/wsdl/partnerAPI" xsi:type="ns1:SimpleFilterPart">
                     <ns1:Property>ContentType</ns1:Property>
                     <ns1:SimpleOperator>equals</ns1:SimpleOperator>
                     <ns1:Value>dataextension</ns1:Value>
                </ns1:Filter>
                <QueryAllAccounts>true</QueryAllAccounts>
            </RetrieveRequest>
      </RetrieveRequestMsg>
   </s:Body>
</s:Envelope>

Best Answer

In simple filter, replace dataextension with shared_dataextension

http://help.marketingcloud.com/en/technical_library/web_service_guide/objects/datafolder/

Related Topic