How to check user is logged in or not.

niveditakumari
Mega Sage

Hello, 

How to check user is logged in or not. 

ex - when user receives an email and in that user receives some link and after clicking on that link it should check whether user is logged in or not if yes then it should redirect user to particular service now page else it should redirect user to login page. 

Can anyone please help me with this. 

 

Regards, 

Nivedita 

1 ACCEPTED SOLUTION

Hi Nivedita,

 

First i would suggest you to not paste the complete url as you did in your previous since it is taking to your customer Prod instance and anyone can able to order the catalog request. Please try to remove it or at least remove the instance name from the link

 

Coming to your issue, i use you are using  "com.glideapp.servicecatalog_cat_item_view" in your URL which is a UI Page first try to see if this ui page is granted as public for goto ui page and search with the name and if you dont find anyting there goto sys_public table and search in the page field if it is available try to inactive and see if it works. 

 

Next if you dont find anything there go to that catalog item which is "Solicitud Extensión Guad" and look for the field role and see if is public you can remove and try again.

 

Basically if the ui page or catalog item are set as public which means any user outside servicenow can access that particular page/cat item. if you find that i think you can solve your issue.

 

Please go through below link where it clearly explain how to make the catalog item as public you just need to follow the steps and and if you find anything try to remove and inactive and try again.

 

https://hi.service-now.com/kb_view.do?sysparm_article=KB0551300

 

 

Note: Please try in Sandbox or Developer instance first before trying to implement in Prod instance.

 

 

If my reply was helpful / resolved your issue please mark it as correct / helpful

Regards,

Abdul Azeez

 

 

 

View solution in original post

18 REPLIES 18

Hello Abdul, 

I have checked in our system it's created by "admin" and i have checked notification also..there are few notifications has been created in system for this 

Solicitud catalog item only..in that notification this link has been used but there
are many notifications available in our system..do i
need to checkevery notification..if yes how to check every notification.

Thank you for your explanation..i will go through that link which you have provided to me.

Sorry for the late reply.

 

You can navigate to Notification and in the breadcrumbs fitler with Message HTML as shown below:

 

find_real_file.png

 

with this you can find in which notification this ui page is called once it is done use the same for email templates as well.

 

Navigate to Templates under System Policy:

 

find_real_file.png

 

 

find_real_file.png

 

 

With this you can find if you have anything called via email templates.

 

If you dont have any you no need to worry if you have any then you need to sort down with your team.

 

 

Regards,

Abdul Azeez

Hello Abdul, 

Thank you for your reply. 

I have searched "com.glideapp.servicecatalog_cat_item_view" in notifications and template both and i found that "com.glideapp.servicecatalog_cat_item_view" it is not used in templates but yes it is used in some of other notification and i have tested those notification too and links which is provided in those notification are working same..like link which is given in other notification which were not redirecting to login page if user is not logged in but now after i have inactive "com.glideapp.servicecatalog_cat_item_view" ui page, these links are redirecting to login page for other notifications.

So i think it is working fine now. 

 

Regards, 

Nivedita 

Hello Abdul, 

Thank you for your reply. 

I have searched "com.glideapp.servicecatalog_cat_item_view" in notifications and template both and i found that "com.glideapp.servicecatalog_cat_item_view" it is not used in templates but yes it is used in some of other notification and i have tested those notification too and links which is provided in those notification are working same..like link which is given in other notification which were not redirecting to login page if user is not logged in but now after i have inactive "com.glideapp.servicecatalog_cat_item_view" ui page, these links are redirecting to login page for other notifications.

So i think it is working fine now?

 

Regards, 

Nivedita 

Any suggestions for my below query that how can i check it is impacting other functionality or not.