Display logged‑in user name with logo in header for Portal Experience built with UI Builder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi everyone,
I’m working on a Portal Experience in UI Builder and I’d like to display the logged-in user’s name next to the user logo in the header.
I couldn't find a solution for this in the ServiceNow documentation. Could someone guide me on how to fetch the user's name and display it in the header?
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @abhaysingh7,
You can achieve this directly in UI Builder without any scripting.
Step 1:
In your header container, add a Stylized Text component next to the Avatar (user logo) component.
Step 2:
Select the Stylized Text component and bind its Text property to the logged-in user’s name.
Use the following data binding:
Once saved, the header will automatically display the logged-in user’s name next to the avatar.This works out of the box because UI Builder exposes the current user object globally.
If my response helped, please mark it as the accepted solution so others can benefit as well.
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @miftikhar20 ,
I am working on a portal experience created via App Engine in UI Builder. I would like to display the logged-in user's name within the inbuilt default header component. Could you please guide me on how to map the session data to the standard header properties
Regards,
Abhay Singh T
