57
Views
7
Comments
[Password Reset Service] Reset Password Email
password-reset-service
Service icon
Forge asset by Barduino
Application Type
Service
Service Studio Version
11.54.27 (Build 62831)

Hello,


I started working with Outsystems quite recently. Now, for a project, I am trying to implement a forgot password logic.For that I installed this Plug in and followed all the demo step, but it's not working. When I try to use it appears an error message indicatinh my domanin is not valid. 


For a better understanding, here are some images and a sample.



ResetPassword.png
ResetPasswordError.png
ForgotPassword.oml
UserImage.jpg
Barduino

Hi,

Please take a look at the documentation here.

Try using these methods:


UserToken_RegisterDomain

Registers a domain as an authorized domain for password recovery URL

ALWAYS use an server side method to call this API.

Requires user to have the PasswordResetService role


UserToken_UnRegisterDomain

Unregisters a domain as an authorized domain for password recovery URL.

ALWAYS use an server side method to call this API.

Requires user to have the PasswordResetService role.


ServiceUser_Create

A service user can be automatically created by this module, and granted the PasswordResetService role.

2025-12-17 21-10-06
Shlok Agrawal

Hey Duarte Santos,

Please share the service log regarding this error, I am sure there you might have received the error and more details.

2023-10-30 10-29-57
Duarte Santos

Hi, @Shlok Agrawal 


Actually, I tried to follow the instructions above, but it still doesn't work. As you sugested I look into Service Center and it says:

Message: Invalid role

Environment Information

eSpaceVer: Id=1322, PubId=0, CompiledWith=11.23.0.40636RequestUrl: https://personal-3atyv8b6.outsystemscloud.com/Protacho/screenservices/Protacho/Screens/Forgot_Password/ActionDemo_Token_Create (Method: POST)AppDomain: /LM/W3SVC/36/ROOT/Protacho-77-133409026296250180FilePath: C:\OutSystems\Sandboxes\DWDSYD033\Platform Server\running\Protacho\ClientIp: 64.252.85.192 X-Forwarded-For: 85.138.63.180Locale: en-USDateFormat: yyyy-MM-ddPID: 75544 ('w3wp', Started='10/3/2023 10:14:54 PM', Priv=298Mb, Virt=2115750Mb)TID: 29Thread Name:.NET: 4.0.30319.42000

Stack

Invalid role   at ssProtacho.RsseSpacePasswordReset_SRV.PasswordReset_SRVServiceAPIClients.UserToken_RegisterDomain(HeContext heContext, String inParamDomain)   at ssProtacho.RsseSpacePasswordReset_SRV.UserToken_RegisterDomain(HeContext heContext, String inParamDomain)   at ssProtacho.Actions.ActionDemo_Token_Create(HeContext heContext, String inParamEmail)   at ssProtacho.ScreenServices.Protacho_Screens_Forgot_Password_Controller.b__1(HeContext heContext, String screenName, JObject screenModel, JObject inputParameters, JObject clientVariables)   at OutSystems.RESTService.Controllers.ScreenServicesApiController.endpoint(String input, String endpointName, String apiVersion, EndpointImplementationDelegate implementation)


It must be something quite simple, but as I'm new to the platform I can't find the solution.

2025-12-17 21-10-06
Shlok Agrawal

Obviously its say "Invalid Role" but as you are new to the platform let me explain what might be happening behind, a specific type of role in your application might have permission to change the password, in majority time its like Admin or End User. Either the your application isn't properly configured or That specific action doesn't have permission to perform that action. 

Please if you could share the OML of you project it would be helpful or some other resources like Images from where this block is called might help.

Thanks 
Shlok Agrawal.

2023-10-30 10-29-57
Duarte Santos

Thank you for your explanation!

For a better understandig of the probable error I share the OML with you.

ForgotPassword.oml
2025-12-17 21-10-06
Shlok Agrawal

Hey Duarte 
From what I see in the stack inside the log and the OML you shared is that you were trying the logic of Forget password.  

Required Flow to go through:

1) But first you need to create a user using the screen  "Create new Account"
2) Now the user is registered, now after creating a new account you should go with the flow of the Forget password.

If you have gone through this flow and still face the error, make sure in the code the UserId is been passed correctly in "CreateAnAccount" Server action.

Thanks 
Shlok Agrawal 

UserImage.jpg
protacho app

Thanks, Shlok!

I can create a new user and give him the role I want. However, when I try to flow the forgot password process, I don't receive and email with the link to reset password. I believe there's a problem with "Demo_Token_Create" logic. 

Imagem1.png
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.