1

The role object [https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/role.htm] appears to be missing all of the Marketing Cloud XXXX roles. The below WSproxy code will run successfully but only returns the classic exacttarget roles (eg: Administrator, Content Creator, Data Manager, Analyst, Distributed Sending User).

Any ideas as to why the Marketing Cloud XXXX roles (such as Marketing Cloud Administrator (SYS_DEF_IMHADMIN)) are not being returned in this object retrieve?

Funnily enough Marketing Cloud roles do come through when retrieving the AccountUser object and inspecting the Roles array.

As a by product of the Marketing Cloud roles not being available in the Role object, it seems I am unable to create or assign users Marketing Cloud roles with the soap API (it is only working for classic roles).

Ideally my end state is being able to assign a user Marketing Cloud Administrator role via API, however, I believe the core issue relates to the Role object itself.

<script runat="server" language="javascript">
    Platform.Load("core","1.1");
    var prox = new Script.Util.WSProxy();

try {
  
    var cols = ["Name", "CustomerKey", "Description", "ObjectID"];
    var filter = {
            Property: "CustomerKey",
            SimpleOperator: "like",
            Value: "SYS"
    };
  
   var res = prox.retrieve("Role", cols, filter);
    
    Write(Stringify(res));
  
} catch (error) {
    Write(Stringify(error));
}


</script>

Your Answer

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

Browse other questions tagged or ask your own question.