Expand my Community achievements bar.

How to create user profiles in Adobe Campaign via Javascript or through SOAP API ?

Avatar

Level 1

We have a use case to automate the User Profile creation when the new user is onboarded on the Adobe Campaign ( Classic V7,8984). Currently this process is manual.

5 Replies

Avatar

Community Advisor

Hello,

 

If you are talking about the creation of Campaign  operator, you could use the JS bellow :

 

var operator = NLWS.xtkOperator.create({
 operator : {
  email : 'email@domain.net',
  label : 'auto generated operator'
operatorGroup : {
group : {
type : 2
name : 'local'
}
} } }; operator.save();
NLWS.xtkOperator.ResetPassword( operator.name, 'newPassword') //of course fill a strong and random password here
logInfo('New Operator created : ' + operator.name )

The operatorGroup is added because at least 1 right is needed to connect to Campaign. But you can change and configure what you need (and add other rights, but using Array [] instead of simple object {})

Cedric

 

Avatar

Level 5

Hi @CedricRey 

 

Thanks for sharing this code to create a user using javascript!

But, in my case I've had a error like this: 

10/02/2023 11:59:04 AM js Method 'resetPassword' unknown in schema 'xtk:operator'.

Do you know the cause of this error?

 

Regards

 

Avatar

Community Advisor

Hi @acc_acs,

you seem using resetPassword instead of ResetPassword. As EcmaSrcipt is case sensitive, can you try with ResetPassword (with capital R) please ?

Cedric 

Avatar

Level 5

Hi @CedricRey ,

 

Yes, now it works without errors. Thanks!

But, the log tells me that the user was created, but I can't find it.
"10/02/2023 12:26:32 PM js New Operator created : arhtLOGIN219"
I go to the folder, search, filter, but I can't find the User that was supposedly created.
/Administration/Access Management/Operators/

Is there any other place where I can find this user? Or is it hidden? Because the script does not occur errors and says that it created the user successfully. But I can't find it in the operators folder.

acc_acs_0-1696251449716.png

 

 

Regards