I have a Data Extension which exists in the Shared Data Extensions directory and is available to all Business Units. I want to use the SOAP API to retrieve fields from this Data Extension.
I've tried the following SOAP envelopes in my request:
1. Standard Envelope
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<fueloauth xmlns="http://exacttarget.com">insertAccessToken</fueloauth>
</soapenv:Header>
<soapenv:Body>
<RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
<RetrieveRequest>
<ObjectType>DataExtensionObject[CFC5D020-6256-4ADC-84A6-72BCE042C351]</ObjectType>
<Properties>FUNDID</Properties>
</RetrieveRequest>
</RetrieveRequestMsg>
</soapenv:Body>
</soapenv:Envelope>
2. Query All Accounts Option
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<fueloauth xmlns="http://exacttarget.com">insertAccessToken</fueloauth>
</soapenv:Header>
<soapenv:Body>
<RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
<RetrieveRequest>
<ObjectType>DataExtensionObject[CFC5D020-6256-4ADC-84A6-72BCE042C351]</ObjectType>
<QueryAllAccounts>true</QueryAllAccounts>
<Properties>FUNDID</Properties>
</RetrieveRequest>
</RetrieveRequestMsg>
</soapenv:Body>
</soapenv:Envelope>
3. Query individual MID Option
Note: I've tried using the MID of the parent and child Business Unit
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<fueloauth xmlns="http://exacttarget.com">insertAccessToken</fueloauth>
</soapenv:Header>
<soapenv:Body>
<RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
<RetrieveRequest>
<ObjectType>DataExtensionObject[CFC5D020-6256-4ADC-84A6-72BCE042C351]</ObjectType>
<Client><ID>7230771</ID></Client>
<Properties>FUNDID</Properties>
</RetrieveRequest>
</RetrieveRequestMsg>
</soapenv:Body>
</soapenv:Envelope>
Response
I always get the following response:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope>
<soap:Header>
...
</soap:Header>
<soap:Body>
<RetrieveResponseMsg
xmlns="http://exacttarget.com/wsdl/partnerAPI">
<OverallStatus>Error: Invalid object name 'C7231594.Fund Details'.</OverallStatus>
<RequestID>c735f5c2-ae59-4c67-8fb9-f4b9aa518b2e</RequestID>
</RetrieveResponseMsg>
</soap:Body>
</soap:Envelope>
Note that the DE name is 'Fund Details'. I get the same error with different Shared Data Extensions, however if the DE is in the Data Extensions directory (or in subfolder) then my request works fine.
Any ideas how to retrieve fields from a Shared Data Extension using the SOAP API?