TransWikia.com

Update AccountUser via WSProxy

Salesforce Asked by user5105 on January 18, 2021

Has anybody been able to update the AccountUser object. For example, disable a user or delete a user. I was not able to find any documentation about it. I almost got my WSProxy code working the only part that I am getting an error on is setting the UserID. I am getting the following error:

User 0 does not have permission to edit ACCOUNTUSERS on account MID.

prox.setClientId({"ID": MID, "UserID": 'felipe.diaz'});
var updateObject = {
AccountUserID: 'AccountID',
ActiveFlag: 'true'
};

var options = {SaveOptions: [{'PropertyName': '*', SaveAction: 'UpdateAdd'}]};
var res = prox.updateItem('AccountUser', updateObject, options);

2 Answers

The SOAP API error “User [n] does not have permission to edit ACCOUNTUSERS on account [MID]” has been fixed in the July 2020 release.

Answered by Eliot Harper on January 18, 2021

I've spent some time trying to workaround this, but get the same error as the one you reported. I've also tried using the SSJS/AMPscript API functions and get the same error.

This is a known issue with the SOAP API (WSProxy is a wrapper for the SOAP API). Refer to this known issue.

For now, it appears the only workaround would be to enable 'Enable Username and Password for Web Services' in Setup > Security > Security Settings and then create a user with API User with an Administrator Role. Then, you would be able to make an HTTPPost request to the Marketing Cloud SOAP API with basic authentication. Not ideal, I know.

Answered by Eliot Harper on January 18, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP