Forgot password - email configuration

SaurabhMahe
Tera Contributor

We have configured two custom URLs in our ServiceNow instance. We now have a requirement to enable the Forgot Password feature for end users so they can reset their passwords independently. The configuration for the Forgot Password functionality has been completed; however, we are facing an issue with the password reset email link.
During the password reset process, users receive an email containing a URL that redirects them to the password reset page. Currently, this link displays the default instance URL. Our requirement is that this URL should instead use one of our custom URLs. If we have one custom url then we can update the properties. However, we have two custom URLs configured, the password reset link should redirect users to the appropriate custom URL rather than the default ServiceNow instance URL.
Could you please advise how we can update the configuration to meet this requirement?

5 REPLIES 5

martinvirag
Mega Sage

you need to configure the glide.proxy.host  with your custom URL and then it will update automatically the glide.servlet.uri that is used in the code.

However, in the instances where I have a custom URL setup the 

glide.servlet.uri is actually returning the URL where the custom URL is set as DEFAULT instance URL.

So you have 2 options.
Set the URL as default instance URL on the Custom URL record

OR

update the glide.proxy.host  parameter


Regards,
**Martin Virag**
ServiceNow Rising Star

yashkamde
Tera Guru

Hello @SaurabhMahe ,

 

There is one OOTB notification where through an template password reset link notification is configured :

Screenshot 2026-02-17 181148.png

 

There is an email script written where the URL is configured ->

Screenshot 2026-02-17 181202.png

 

You can refer this and implement in your use case,

If my response helped mark as helpful and accept the solution.

Also you can use the property :

gs.getProperty('glide.servlet.uri');

 

You will get the current instance URL,

 

Try this on Background scripts :

var instance = gs.getProperty('glide.servlet.uri')+'';

 

gs.print(instance);

SaurabhMahe
Tera Contributor

Hi , thanks for reply,  we can only set one custom url for  glide.proxy.host  ? how can we use this for mulitple custom url values.