This function returns the username of the authenticated Marketing Cloud account user who is accessing the page. This is useful when creating customized pages for child Business Units (a feature available in earlier Enterprise 2.0 accounts).

NOTE: This function will only return the correct value in CloudPages when it is first assigned to a variable.



This function does not accept any arguments.


The following example displays the username of the Marketing Cloud user accessing the page (with an active Marketing Cloud session) on a customized page.


var @UserName

set @UserName = AuthenticatedEmployeeUserName()

<p>Hello %%=v(@UserName)=%%,</p>


The function returns the username associated with the Marketing Cloud user account.

<p>Hello Sam,</p>