1

We are reaching our "licence limit" and need to do some spring cleaning (deactivate dormant accounts).

I am trying to return a list of subscribers that have not logged in for 3 months so we can deactivate them .

I am using the following SOAP call

<?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}}</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>AccountUser</ObjectType>
     <QueryAllAccounts>true</QueryAllAccounts> 
     <Properties>email</Properties>
     <Properties>ActiveFlag</Properties>
     <Properties>CreatedDate</Properties>
     <Properties>isAPIUser</Properties>
     <Properties>UserID</Properties>
     <Properties>LastSuccessfulLogin</Properties>
       <Filter xsi:type="par:ComplexFilterPart" xmlns:par="http://exacttarget.com/wsdl/partnerAPI">
               <LeftOperand xsi:type="par:SimpleFilterPart">
                  <Property>ActiveFlag</Property>
                  <SimpleOperator>equals</SimpleOperator>
                  <Value>True</Value>
               </LeftOperand>
               <LogicalOperator>AND</LogicalOperator>
               <RightOperand xsi:type="par:SimpleFilterPart">
                  <Property>LastSuccessfulLogin</Property>
                  <SimpleOperator>lessThan</SimpleOperator>
                  <DateValue>2017-05-20T11:25:54.617-07:00</DateValue>
               </RightOperand>
            </Filter>
  </RetrieveRequest>
  </RetrieveRequestMsg>
</s:Body>
 </s:Envelope>

I am getting the following error in the response:

<soap:Body>
        <RetrieveResponseMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
            <OverallStatus>Error: The Filter Property 'LastSuccessfulLogin' is not a retrievable property.</OverallStatus>
            <RequestID>1fce45fd-1570-4fd9-865c-8a079962ef69</RequestID>
        </RetrieveResponseMsg>
    </soap:Body>

The field LastSuccessfulLogin is a date field and should be retrievable.

Anyone else had this issue / knows how to get around it?

2 Answers 2

1

Why do you want to do this by API?

You could go to Admin > Users Then select 'Enabled Users' from the drop down.

Finally, click on 'Last Login Date' column to sort the results in order.

Disable anyone who hasn't logged in for N days/months and free up some licenses.

1

I don't think every attribute listed in official document is retrievable in SOAP API.

I had similar question about retrieving ModifiedBy Attribute (in return fields or filter) for Email object.

It is listed as an attribute in the online document but when I use it, it returns" ModifiedBy is not retrievable property" error.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .