The siteId in a SiteAccess record specifies which Site the access grant covers. A single user may have multiple SiteAccess records — one per site they have been assigned to — each with its own role. When piper loads data for a user, it filters to the sites where their userId appears in a SiteAccess record, ensuring they only see and interact with sites they have been explicitly granted access to.
Technical section
Data model, API, and internals — visible to developers.
