is there a way to remove a Role from a user using the Marketing Cloud SOAP API? I've retrieved the AccountUser object with the corresponding Roles, I remove the specific Role from the array and make an Update to that user and it's Roles. I get a successful response from the API but when I go check in Marketing Cloud the user still has the role I was trying to remove.

Any insights or past experience is greatly appreciated. Thanks!

  • Can you share teh soap enevelope you are using to update the accountuser object? – EazyE Dec 5 '19 at 20:16

Use following soap request to remove role at business unit level:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <ConfigureRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
              <Configuration xsi:type="Role">
                   <!--*****ROLE ID*****-->
                                <!--TO DELETE ROLE FROM USER AT BUSINESSUNIT MARK TRUE -->

  • Thank you! When I perform that request I get: <OverallStatus>OK</OverallStatus> But the change is not reflected in the UI. – patosapir Dec 6 '19 at 21:59
  • @patosapir this request is for removing roles assigned at Business Unit level and not directly assigned to the user. Please check how role was assigned. – Ros Haitovich Dec 7 '19 at 8:24

I've actually was able to do this based on the previous response provided, here's the SOAP body:

            <Objects xsi:type="AccountUser">
  • Thanks for sharing this code, I am trying to do the opposite - assigning a custom role to a user. I can't figure out how to do it. Do you mind sharing where do you find the fields name for 'AssignmentConfiguration'? – Eliott May 23 '20 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.