User
The User is the global identity in Azalt. A single account can belong to multiple organizations but operates within one current organization at a time.At a Glance
- Global identity: not scoped to an organization
- One active context:
currentOrganizationIdselects the working organization - Platform role:
systemRoleis"ADMIN" | "USER"(platform-level) - Org roles come from membership: see Organization User
- Profile:
name,phone,locale, optionalimagevia Media
Data Shape
Current Organization Selection
- If missing, backend selects the earliest ACTIVE membership and sets it as current.
- Users can switch explicitly (see
organization.switch). - If the previously current organization is deleted or the user is removed, it is cleared; the next ACTIVE membership is selected when available.
- If the user has no organizations, organization queries return a client error.
Profile & Media
- Updatable fields:
name,phone,locale. - Email is managed by authentication and not editable via profile.
- Profile pictures live in
Media(fieldName = "profilePicture") and are served via time-limited signed URLs.
System vs Organization Roles
systemRolecontrols platform-level admin features (e.g., global admin views).- Organization roles (Owner/Manager/Approver/Collector/Viewer) are assigned per organization via a membership record.
Typical Operations
- View/update profile (name/phone/locale)
- Switch current organization (only to orgs where the user is a member)
- Accept invitations to new organizations (becomes ACTIVE upon acceptance)
Tips & Edge Cases
- Locale defaults to
"en"in API responses when not set. - Removing a user from the current organization immediately clears
currentOrganizationId. - The user list within an organization includes a signed
imageURL when a profile picture exists.
Related Concepts
- Organization User — membership, role, and status
- Organization User Site — site-level access assignments

