AuthenticatedEmployeeNotificationAddress
Returns the notification email address of the Marketing Cloud user tied to the current context. Runtime-proven on a live Marketing Cloud Engagement CloudPage — a public, anonymous request gets a real mailbox address back, and it is not the same string as the similarly email-shaped username.
Syntax
AuthenticatedEmployeeNotificationAddress() → string
Parameters
This function takes no parameters.
Example
%%[
VAR @notifyAddress
SET @notifyAddress = AuthenticatedEmployeeNotificationAddress()
]%%
Notify: %%=v(@notifyAddress)=%%
Renders an ordinary email address — on the business unit tested, a dotted local part, an @, then a registered corporate mail domain.
Because the value is a real, deliverable mailbox belonging to an account user, keep it out of anything a visitor can see and use it only where an internal address is wanted:
%%[
VAR @notifyAddress, @isUsable
SET @notifyAddress = AuthenticatedEmployeeNotificationAddress()
SET @isUsable = IsEmailAddress(@notifyAddress)
]%%
%%=v(@isUsable)=%%
What it does not support is a sign-in check, and it is not interchangeable with the username — see below.
Return value
string — a notification email address.
The value domain is open: an address is account-scoped free text, so there is no closed set of sentinel values to test for. In particular there is no “not signed in” sentinel — an unauthenticated request gets an ordinary address back.
Behaviour
The official reference scopes this function to microsites with sender authenticated redirection and says it is not for use with CloudPages. At runtime a public, anonymous CloudPage request rendered a real notification address anyway.
A public CloudPage request gets a value, not an empty result. An anonymous request to the published URL, carrying no Marketing Cloud session at all, rendered an email address at HTTP 200. Empty() on the same value answered false and Length() gave 29.
The result is a value, not a page-terminating call. It compared against the empty string, rendered inline without a variable, and rendered unchanged nested inside a Concat between two surrounding characters. Every line after the call still rendered.
The value is stable inside one render. Three separate calls in the same request — an assignment, an inline call and a nested call — produced identical output.
It is a real address, and it is not the username
IndexOf found a single @ after a 16-character local part, a . earlier inside that local part, and no space anywhere; IsEmailAddress() accepted the whole value. Unlike its sibling, the part after the @ is an ordinary registered mail domain, so treat the result as a deliverable mailbox and as account-identifying data.
The tempting assumption is that this returns the same string as AuthenticatedEmployeeUserName, which is itself email-shaped. Called in the same render, the two compared as not equal: the address measured 29 characters against the username’s 39, because the username carries a longer account-scoped suffix that is not a mail domain. It is equally unrelated to AuthenticatedEmployeeID — the values differ, the ID is 9 characters, and IndexOf of the ID inside the address answered 0, its not-found result. Call whichever of the three you actually need; none substitutes for another.
Do not use it as an authentication check
Because a value always comes back, a page cannot infer from a non-empty result that its visitor is a signed-in Marketing Cloud user. Content gated on that check would be open to everyone. Use a real authentication mechanism for the gate and treat this function as context information only.
Show test script
%%[
VAR @b, @aena, @uname, @eid
SET @b = RequestParameter("b")
/* known-good control: renders on every request, so a run of HTTP 422s
can be told apart from a deploy that failed to compile */
OutputLine(Concat("CTRL=[", Uppercase("ok"), "]"))
OutputLine(Concat("--- AENA start ---"))
/* a plain anonymous request still produces a value */
SET @aena = AuthenticatedEmployeeNotificationAddress()
OutputLine(Concat("AENA=[", @aena, "]"))
/* confirmed with a second function rather than read off empty brackets */
OutputLine(Concat("AENA_EMPTY=[", IIf(Empty(@aena), "empty", "not-empty"), "]"))
OutputLine(Concat("AENA_LEN=[", Length(Concat(@aena, "")), "]"))
/* the value is usable inline, nested and in a comparison */
OutputLine(Concat("AENA_DIRECT=[", AuthenticatedEmployeeNotificationAddress(), "]"))
OutputLine(Concat("AENA_IN_CONCAT=[", Concat("<", AuthenticatedEmployeeNotificationAddress(), ">"), "]"))
OutputLine(Concat("AENA_CMP=[", IIf(@aena == "", "eq-emptystring", "ne-emptystring"), "]"))
OutputLine(Concat("--- AENA done ---"))
/* what the value looks like, and whether it is the same string as either sibling */
IF @b == "shape" THEN
OutputLine(Concat("--- shape start ---"))
OutputLine(Concat("AT_POS=[", IndexOf(@aena, "@"), "]"))
OutputLine(Concat("DOT_POS=[", IndexOf(@aena, "."), "]"))
OutputLine(Concat("SPACE_POS=[", IndexOf(@aena, " "), "]"))
OutputLine(Concat("IS_EMAIL=[", IIf(IsEmailAddress(@aena), "yes", "no"), "]"))
SET @uname = AuthenticatedEmployeeUserName()
SET @eid = AuthenticatedEmployeeID()
OutputLine(Concat("UNAME_LEN=[", Length(Concat(@uname, "")), "]"))
OutputLine(Concat("EID_LEN=[", Length(Concat(@eid, "")), "]"))
OutputLine(Concat("SAME_AS_UNAME=[", IIf(@aena == @uname, "identical", "different"), "]"))
OutputLine(Concat("SAME_AS_EID=[", IIf(@aena == @eid, "identical", "different"), "]"))
OutputLine(Concat("EID_IN_AENA=[", IndexOf(@aena, @eid), "]"))
OutputLine(Concat("--- shape done ---"))
ENDIF
/* argument counts the signature does not allow: each aborts its branch */
IF @b == "ar1" THEN
OutputLine(Concat("--- ar1 start ---"))
OutputLine(Concat("AENA1=[", AuthenticatedEmployeeNotificationAddress("x"), "]"))
OutputLine(Concat("--- ar1 done ---"))
ENDIF
IF @b == "ar2" THEN
OutputLine(Concat("--- ar2 start ---"))
OutputLine(Concat("AENA2=[", AuthenticatedEmployeeNotificationAddress("x", "y"), "]"))
OutputLine(Concat("--- ar2 done ---"))
ENDIF
]%%
Every marker and label in the test script goes through Concat(...), including single-argument ones. A bare string literal passed to OutputLine renders an empty line while the page still returns HTTP 200, so the marker silently vanishes.
Availability
| Platform | Available |
|---|---|
| Marketing Cloud Engagement | Yes |
| Marketing Cloud Next | No |
The official reference scopes this function to microsites using sender authenticated redirection and states it is not for CloudPages — a scoping contradicted by the observed behaviour, since a public CloudPage rendered a value regardless (see the differs-from-docs card). The authenticated microsite path was not exercised here — a public CloudPage cannot supply such a session — so everything on this page describes the unauthenticated CloudPage context only, and no claim is made about whose identity the returned address represents.