Get the email address or principal identifier of the user that's running
the query.
SESSION_USER
SESSION_USER()
Description
For first-party users, returns the email address of the user that's running the
query.
For third-party users, returns the
principal identifier
of the user that's running the query.
For more information about identities, see
Principals.
Return Data Type
STRING
Example
SELECTSESSION_USER()asuser;/*----------------------* | user | +----------------------+ | jdoe@example.com | *----------------------*/
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-02 UTC."],[[["GoogleSQL for BigQuery offers security functions, including one called `SESSION_USER`."],["The `SESSION_USER` function returns the email address for first-party users executing the query."],["For third-party users, `SESSION_USER` provides the principal identifier of the user running the query."],["The function `SESSION_USER` returns a value of the type string."]]],[]]
Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.
Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.
🎥 Watch TMZ Live
TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.