1

I have an strange issue I'm encountering with creating an AccountUser with the SOAP API. The API returns an OverallStatus of "OK", but no user is ever created. The credentials I'm using can create users through the UI with no issue.

Anybody have any ideas or encountered similar?

   <createrequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
<Options/>
 <Objects xsi:type="AccountUser" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Client>
       <ID>10894001</ID>
    </Client>
    <UserID>api2.jba</UserID>
    <Password>Password@1</Password>
    <Name>api2.jba</Name>
    <Email>[email protected]</Email>
    <MustChangePassword>false</MustChangePassword>
    <DefaultBusinessUnit>10894001</DefaultBusinessUnit>
    <AssociatedBusinessUnits>
       <BusinessUnit>
          <ID>10894001</ID>
       </BusinessUnit>
    </AssociatedBusinessUnits>
 </Objects>
</createrequest>
3
  • I have tried following the documented example and get an OverallStatus>OK</OverallStatus> response, but I can't see the new user :-( Commented Feb 1, 2017 at 6:06
  • Thanks for giving it a spin, @EliotHarper. I get the same thing from a couple of accounts I've tried it on. Uuurgh!
    – Macca
    Commented Feb 1, 2017 at 6:08
  • I've tried different permutations of this request and get the same result each time. I'd open a support case on this if I were you. The documentation is incorrect and it needs to be updated. Commented Feb 1, 2017 at 15:15

1 Answer 1

5

For posterity...

<CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
  <Options>
    <SaveOptions>
      <SaveOption>
        <PropertyName>*</PropertyName>
        <SaveAction>UpdateAdd</SaveAction>
      </SaveOption>
    </SaveOptions>
  </Options> 
  <Objects xsi:type="AccountUser">
    <PartnerKey xsi:nil="true"></PartnerKey>
    <ObjectID xsi:nil="true"></ObjectID>
    <Client>
      <ID>1234565</ID>
    </Client>
    <UserID>SampleUser</UserID>
    <Password>Password@1</Password>
    <Name>SampleUser</Name>
    <Email>[email protected]</Email>
    <NotificationEmailAddress>[email protected]</NotificationEmailAddress>
    <ActiveFlag>true</ActiveFlag>
    <IsAPIUser>true</IsAPIUser>
    <IsLocked>false</IsLocked>
    <MustChangePassword>true</MustChangePassword>
    <DefaultBusinessUnit>1234567</DefaultBusinessUnit>
    <Roles>
      <Role>
        <ObjectID>05245651-6447-e511-bb64-ac162dbd280c</ObjectID>
      </Role>
      <Role>
        <ObjectID>11245651-6447-e511-bb64-ac162dbd280c</ObjectID>
      </Role>
    </Roles>
    <AssociatedBusinessUnits>
      <BusinessUnit>
        <CustomerKey>MyMIDCustomerKey</CustomerKey>
      </BusinessUnit>
    </AssociatedBusinessUnits>
  </Objects>
</CreateRequest>
1
  • For the BusinessUnit section and the MID, I think you have to specify it as ID, not CustomerKey. Commented Mar 23, 2022 at 20:46

You must log in to answer this question.

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