Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to get current logged in user in server side and client side?

ak4
Tera Contributor

How to get current logged in user in server side and client side?

 

5 REPLIES 5

Try this

 

var user = gs.getUserID();
var priGrp = user.getPrimaryGroup().getDisplayValue();