Overview
Location member assignment enables location-based access control in Xenia. By assigning users to specific locations, you can:- Control visibility: Users only see data for their assigned locations
- Route tasks: Automatically assign tasks to users at specific locations
- Enable reporting: Generate location-specific performance reports
- Manage schedules: Create location-based inspection schedules
Feature Required: Location member management requires the
ADVANCED_LOCATION_BASED_ASSIGNMENT feature to be enabled for your workspace.List Location Members
Retrieve all users assigned to a specific location.Add Member to Location
Assign a single user to a location.| Field | Type | Required | Description |
|---|---|---|---|
memberId | string | Yes | User ID to add to the location |
Permissions Required:
CAN_ACCESS_LOCATIONS AND CAN_EDIT_LOCATIONSReplace All Location Members
Set the complete list of members for a location, replacing any existing assignments.| Field | Type | Required | Description |
|---|---|---|---|
memberIds | string[] | Yes | Array of user IDs to assign to the location |
Remove Member from Location
Remove a user from a specific location.| Parameter | Type | Description |
|---|---|---|
locationId | UUID | Location to remove member from |
memberId | UUID | User ID to remove |
Update User’s Locations
Update which locations a user is assigned to and optionally set their default location.| Field | Type | Required | Description |
|---|---|---|---|
locations | string[] | No | Array of location IDs to assign to the user |
defaultLocationId | UUID | No | User’s default location (must be in locations array) |
Permissions Required:
CAN_ACCESS_LOCATIONS AND CAN_EDIT_LOCATIONSAssign Members During Location Creation
You can assign members when creating a location by includingmemberIds in the hierarchy configuration.
Common Workflows
Onboarding a New Employee to Locations
Complete Example:Transferring an Employee to a New Location
Bulk Assign Team to Location
When opening a new location or restructuring, assign multiple users at once:Syncing Location Assignments from HR System
Location-Based Access Control
When users are assigned to locations, Xenia automatically enforces location-based visibility:| Feature | Behavior |
|---|---|
| Tasks | Users see tasks at their assigned locations |
| Submissions | Users can complete inspections at their locations |
| Reporting | Reports filter to user’s location scope |
| Notifications | Location-specific alerts sent to assigned users |
Hierarchy Inheritance
Location assignments can inherit up or down the hierarchy based on configuration:- Parent access: User assigned to “North America” may see all sub-locations
- Site-specific: User assigned to “NYC Office” only sees that site
- Room-level: User assigned to specific rooms sees only those rooms
Inheritance behavior depends on your workspace configuration. Contact support for custom location access rules.
Best Practices
Always set a default location
Always set a default location
Every user with location assignments should have a
defaultLocationId. This determines their initial view and default task routing.Use batch operations for bulk changes
Use batch operations for bulk changes
When restructuring or onboarding multiple users, use
PUT /locations/{id}/members to set all members at once rather than individual adds/removes.Coordinate with role permissions
Coordinate with role permissions
Location-based access works alongside role permissions. A user needs both the right role permissions AND location assignment to access features.
Audit location assignments regularly
Audit location assignments regularly
Periodically review location assignments to ensure departed employees are removed and transfers are reflected.
Consider multi-location workers
Consider multi-location workers
Some employees (regional managers, traveling technicians) need access to multiple locations. Assign all relevant locations and set their most common site as default.
Error Handling
| Error Code | Message | Resolution |
|---|---|---|
| 400 | ”Cannot remove user from default location” | Update default location first or use PUT /users/{id}/locations |
| 403 | ”Feature not enabled” | Contact admin to enable ADVANCED_LOCATION_BASED_ASSIGNMENT |
| 404 | ”Location not found” | Verify location ID exists and is not deleted |
| 404 | ”User not found” | Verify user ID exists in the workspace |
Related Guides
- Location Hierarchy - Set up locations and levels
- User Lifecycle - Create and manage users
- Team Management - Organize users into teams