- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2023 06:02 AM - edited 03-24-2023 06:03 AM
How to hide impersonate and logout dropdown under profile
Can any one help me on this tried by Replacing in place of :
.impersonate-and-logout {
div>ul>li:first-child {
&>a#profile-dropdown{
display: none;
}
below changes should be made:
.impersonate-and-logout {
div>ul>li:first-child {
&>a{
display: none;
}
Any one worked before on this /any suggestions
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2023 10:55 PM
Don't understand your remark on the impersonate. Impersonate is only visible to people having the roles to do so. So why hiding this? An end-user without any roles won't see the Impersonate option.
Anyway, higing logout you could achieve multiple ways using CSS. I just really quickly tested with below CSS, works instantly:
a[href="/logout.do?sysparm_goto_url=/esc"] {
display: none !important;
}
If you still also want to hide Impersonate, you can use the same principle.
Kind regards,
Mark
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2023 06:15 AM
Hi there,
You could hide those options using CSS. That way you don't have to edit any widgets.
Question though, why do you want to hide these options? Like impersonation, could be really useful for your admins I would assume? Impersonation is not visible for your end-users by default.
Kind regards,
Mark
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2023 06:25 AM - edited 03-24-2023 06:26 AM
Hi Mark,
Thanks mark for your reply. Actually the requirement is for: non-admin users should not be able to impersonate and logout and when they click on profile icon it must show just user profile.
I tried to hide from css but It's not working , Is there Any way; help is appreciated.
Tried by below but it doesn't work for me
Logout button not visibile for ESC portal for non admin users - Known Error (servicenow.com)
Thanks,
Soumya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2023 10:55 PM
Don't understand your remark on the impersonate. Impersonate is only visible to people having the roles to do so. So why hiding this? An end-user without any roles won't see the Impersonate option.
Anyway, higing logout you could achieve multiple ways using CSS. I just really quickly tested with below CSS, works instantly:
a[href="/logout.do?sysparm_goto_url=/esc"] {
display: none !important;
}
If you still also want to hide Impersonate, you can use the same principle.
Kind regards,
Mark
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2024 11:43 AM
Thank you. This is really helpful to me.
However is there a way to hide 'Profile' option in the drop down?
I tried to use the following but the sys is is dynamic based on log in user.
a[href="?id=hri_user_profile&sys_id=d5dea573c37646d44121fbba050131f4"]{
display: none !important;
}