Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Unable to reset operator password with api

Avatar

Avatar
Validate 1
Level 1
roro_coeur
Level 1

Likes

2 likes

Total Posts

22 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
roro_coeur
Level 1

Likes

2 likes

Total Posts

22 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
roro_coeur
Level 1

22-10-2020

Hello,

I am trying to change an operator password with this JS code :

 

var resetPassword = NLWS.xtkOperator.ResetPassword("login123", "newpassword");

 

but I get Method 'ResetPassword' unknown in schema 'xtk:operator'.

 

Any clue why?

 

Thank you for your help,

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 1
roro_coeur
Level 1

Likes

2 likes

Total Posts

22 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
roro_coeur
Level 1

Likes

2 likes

Total Posts

22 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
roro_coeur
Level 1

29-10-2020

Using the method HashPassword works : 

NLWS.xtkSession.HashPassword("new_password");

And use the value to update the password column in the operator table.

Answers (2)

Answers (2)

Avatar

Avatar
Boost 1
Level 1
Mukesh_Gattu_SA
Level 1

Likes

2 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
Mukesh_Gattu_SA
Level 1

Likes

2 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
Mukesh_Gattu_SA
Level 1

22-10-2020

Hi @roro_coeur ,

 

Are you using the loadLibrary to load the method implementation ? Seems like workflow could not reference the method implementation.

Please add below.

loadLibrary("namespace:xxx.js"); // replace the placeholder with the .js information.

Avatar

Avatar
Validate 1
MVP
_Manoj_Kumar
MVP

Likes

102 likes

Total Posts

300 posts

Correct Reply

96 solutions
Top badges earned
Validate 1
Contributor
Ignite 1
Shape 1
Give Back 5
View profile

Avatar
Validate 1
MVP
_Manoj_Kumar
MVP

Likes

102 likes

Total Posts

300 posts

Correct Reply

96 solutions
Top badges earned
Validate 1
Contributor
Ignite 1
Shape 1
Give Back 5
View profile
_Manoj_Kumar
MVP

22-10-2020

Hello @roro_coeur ,

 

It seems you are trying to run this code via a javascript activity in a workflow.

You don't have administrator access that is why the reset password function is not accessible by your login.

 

You can check the journal tab for more information. You will see an error which says "XTK-170020 Non authorized access to requested service (right 'admin' needed)."

 

Operators with admin access can run this code without any issues.

 

Thanks,

Manoj