Skip to main content

Querying Current User Data

The location of the current logged in user data in the global DOM can be found in the window.currentEmployee selector.

Always verify query results before further processing to avoid errors.

Javascript Code Example

<script type="text/javascript">
// Query the current user email address
var userQuery = window.currentEmployee?.azureActiveDirectoryPrincipalName;

// Check output for a value
if (userQuery!=undefined)
   {
     // Further output processing goes inside the if statement
   }
</script>

Current Employee Data Selectors

Data Point

QuerySelector

Email Address/Principal Name in Azure

azureActiveDirectoryPrincipalName

Email Address

email

Employee Full Name

displayName

Synthesis Employee ID

employeeID

Synthesis User ID

userID

Synthesis Headshot Image ID

primaryImageID

Did this answer your question?