The CreatorCon Call for Content is officially open! Get started here.

Get User Details In SDK Custom UI Page

carmenwhitt
Tera Contributor

I've been trying to find a way to access the logged in user's details from a custom UI Page made in React using the ServiceNow SDK v4.0.2.

 

The only examples given have been using fetch requests to tables using the token retrieved from g_ck for authentication. I'm uncertain how to get this information given that I can't seem to access standard client-side objects, or call script includes from the custom UI Page.

 

I feel like I'm just missing something here if anyone knows how to accomplish this, a hint would be super appreciated.

1 ACCEPTED SOLUTION

BryceG
ServiceNow Employee
ServiceNow Employee

Have you tried this api?

api/now/ui/user/current_user

 

View solution in original post

2 REPLIES 2

BryceG
ServiceNow Employee
ServiceNow Employee

Have you tried this api?

api/now/ui/user/current_user

 

Thank you so much Bryce, I don't know how I missed that. 

 

I'll be sure to ask the members of my team that are more experienced with the REST API first next time!