Feature: Shared Inboxes and Multi-Account Support
Overview
Shared Inboxes and Multi-Account Support enables teams to collaborate on email from shared mailboxes (e.g., support@company.com, billing@company.com) rather than individual accounts. The feature automatically syncs mail accounts from App Suite and provides access control to ensure team members only see inboxes they're authorized to access.
Setting Up a Shared Inbox
Teams does not create mailboxes or manage who may use them. That happens in App Suite, and Teams picks the result up automatically. Three kinds of mailbox can become a shared inbox.
Shared accounts (recommended)
An App Suite administrator provisions a shared account for the team address (support@, sales@) and grants it to users or groups. Each grant carries a permission level (from read-only to full control) and sending rights: whether a grantee may send as the account, on behalf of it, or not at all. Group grants follow group membership, so onboarding a new colleague is a matter of adding them to the team's group.
Teams shows a shared account to every grantee as soon as they open the app, with no minimum number of users. Replies respect the grantee's sending rights (see Reply identity). A grantee who disables the account in their App Suite settings stops seeing it in Teams, and revoking the grant removes it for that user on the next sync.
This is the recommended way to set up a shared inbox. It is the only one where App Suite states who may use the mailbox and how, instead of Teams having to infer it.
Secondary accounts (deprecated)
Before shared accounts existed, the team address was set up as a secondary mail account on each team member's App Suite user, all pointing at the same mailbox with shared credentials. Teams has no grant list for such an account, so it treats one as shared only once at least two distinct users have opened Teams with it (the threshold is configurable per deployment). Until then the account stays hidden, and the sidebar offers to show hidden accounts. Every member can send as the address, because App Suite cannot tell members apart.
This approach is deprecated. It keeps working for existing deployments, but new shared inboxes should be set up as shared accounts. An administrator can migrate an existing team by provisioning a shared account for the same address and granting it to the members; the App Suite middleware documentation describes the steps under "Shared Accounts". The secondary accounts can be removed afterwards.
Shared and public IMAP folders
Where the team collaborates on a folder rather than a whole mailbox, shared IMAP folders (public namespaces and user-to-user shares) appear in the same sidebar section. Replies from a folder go out under the user's own address.
Feature Purpose
Traditional email systems isolate users in individual mailboxes, making team collaboration difficult. Shared Inboxes break down these silos by giving teams unified access to shared email addresses, enabling coordinated responses, workload distribution, and consistent customer communication.
User Value Proposition
For Support Teams:
- Access shared support inbox instead of individual accounts
- See all customer emails in one place
- Collaborate with team on same conversations
- No forwarding or CC'ing required
For Billing/Sales Teams:
- Dedicated inbox for billing/sales emails
- Team visibility into all inquiries
- Consistent responses from "billing@" or "sales@" addresses
- Work distribution across team members
For Team Leads:
- Manage access to shared inboxes
- Monitor team coverage across multiple inboxes
- Balance workload across inboxes
For Organizations:
- Professional shared addresses (support@, sales@)
- Better customer experience (no "who should I email?")
- Continuity when team members are unavailable
- Scalable team-based email handling
Key Capabilities
1. Automatic Account Sync
Description: Sync mail accounts from App Suite automatically without manual configuration.
User Experience:
- Accounts sync on app launch
- New accounts appear automatically
- Removed accounts disappear
- No manual inbox creation needed
- Sync status shown (loading indicator)
Acceptance Criteria:
- Accounts fetched from App Suite API
- Sync happens on app start and JWT refresh
- Added accounts appear in sidebar immediately
- Removed accounts removed from database
- Sync errors shown to user with retry option
Which accounts count as shared:
- Shared accounts are listed as soon as App Suite reports them for the signed-in user. A single grantee is enough; a team of one is still a team. A shared account the user disabled in their App Suite settings stays out of the sidebar until they enable it again.
- Secondary accounts (deprecated, see Setting Up a Shared Inbox) count as shared once at least two distinct users have opened Teams with them.
On deployments where App Suite does not offer shared accounts, only the second rule applies.
2. Shared Inbox List
Description: Display all shared inboxes user has access to.
User Experience:
- "Shared Inboxes" section in sidebar
- Each inbox shows name and icon
- Icons indicate inbox type:
- Support: Headset icon
- Billing: Cash/coin icon
- Info: Info circle icon
- Travel: Airplane icon
- Abuse: Ban icon
- Alphabetically sorted
- Collapsible section (future)
Acceptance Criteria:
- All authorized inboxes shown
- Icons assigned based on name patterns
- Names from App Suite account data
- Click expands inbox (future: show subfolders)
- Empty state if no shared inboxes
3. Personal Inbox Views
Description: Personalized views of work across all inboxes.
User Experience:
- "For You" section above shared inboxes
- "Assigned to me": Threads assigned to current user from all inboxes
- "Shared with me": Threads shared with user (future)
- Person icon for "Assigned to me"
- People icon for "Shared with me"
Acceptance Criteria:
- "Assigned to me" aggregates across all inboxes
- Each thread shows source inbox
- Clicking thread maintains inbox context
- Updates in real-time when assignments change
- Empty state when no assignments
4. Inbox Switching
Description: Switch between different inboxes to view their threads.
User Experience:
- Click inbox name to switch
- Active inbox highlighted in sidebar
- Thread list updates to show inbox threads
- URL updates with inbox ID
- Last viewed thread per inbox remembered
- Breadcrumb shows current inbox (future)
Acceptance Criteria:
- Clicking inbox loads threads within 2 seconds
- Active inbox visually distinct (background color)
- URL format:
?folder=123&thread=abc - Returning to inbox restores thread selection
- Smooth transition between inboxes
5. Team Member Visibility
Description: See who has access to each shared inbox.
User Experience:
- Inbox shows list of team members
- Visible in sidebar tooltip (future)
- Visible in inbox settings (future)
- Real-time awareness in drafts shows active users
- User names and emails displayed
Acceptance Criteria:
- User list fetched from
users_to_inboxtable - All authorized users shown
- User data includes name and email
- List updates when access changes
- No duplicate users
6. Access Control
Description: Ensure users only access authorized inboxes.
User Experience:
- Unauthorized inboxes not shown in list
- API requests for unauthorized inboxes rejected
- Assignment restricted to authorized users
- Clean error messages for access violations
Acceptance Criteria:
- Backend validates inbox access on every request
- 404 error for unauthorized inbox requests
- Can only assign threads to users with inbox access
- Access control enforced at database level
- Audit trail of access violations (future)
7. Multi-Account Thread Context
Description: Maintain inbox context for threads across multiple accounts.
User Experience:
- Each thread knows its source inbox
- Thread actions respect inbox context
- Replies sent from correct inbox address
- Assignment scoped to inbox users
- Thread metadata shows inbox name
Reply identity: A reply from a shared inbox goes out under the identity the mailbox allows.
| Inbox | Reply is sent as |
|---|---|
| Shared account, user may send as the account | The shared address |
| Shared account, user may only send on behalf | The shared address, marked as sent by the user (mail clients show "user on behalf of account") |
| Shared account, user has neither right | The user's own address |
| Secondary account (deprecated) | The shared address; App Suite cannot restrict this per member |
| Shared or public folder | The user's own address |
The sending rights of a shared account are managed by the App Suite administrator, not in Teams.
Acceptance Criteria:
- Thread
inboxfield includes ID and name - API calls include inbox ID parameter
- Replies use the identity the inbox allows (see table above)
- Cannot move threads between inboxes (yet)
- Inbox name displayed in thread header
UI/UX Design
Sidebar Layout
┌─────────────────────┐
│ [+ New Thread] │
├─────────────────────┤
│ For You │
│ 👤 Assigned to me │
│ 👥 Shared with me │
├─────────────────────┤
│ Shared Inboxes │
│ 🎧 Support │ ← active
│ 💰 Billing │
│ ✈️ Travel │
│ ℹ️ Info │
│ 🚫 Abuse │
└─────────────────────┘Inbox Header
Thread List Header
┌──────────────────────────────────┐
│ Support Inbox │
│ 247 threads · 23 unread │
└──────────────────────────────────┘Visual Design
- Active inbox has blue background in sidebar
- Inbox icons use theme accent colors
- Personal views have distinct section header
- Hover states on inbox names
- Loading skeleton during sync
- Error state with retry button
Technical Implementation
Architecture
- Frontend: Vue 3 with folders Pinia store
- Backend: Fastify accounts API
- Database: PostgreSQL with inbox/accounts tables
- Sync: App Suite accounts API integration
API Endpoints
| Endpoint | Method | Purpose |
|---|---|---|
GET /accounts | GET | Fetch user's mail accounts |
Account Sync Flow
- User opens app / JWT refreshes
- Frontend calls
GET /accounts - Backend fetches accounts from App Suite
- Backend syncs accounts with database:
- Insert new accounts
- Delete removed accounts
- Update existing accounts
- Backend returns account list
- Frontend updates sidebar
Data Model
Inbox Table:
{
email: string (PK), // Inbox email address
displayName: string, // Inbox display name
syncToken: string // Mail sync token
}Accounts Table:
{
user: {id, context} (PK), // User reference
id: number (PK), // Account ID from App Suite
email: string (FK) // Links to inbox
}Users to Inbox Junction:
{
user: {id, context} (PK), // User reference
inbox: string (PK) // Inbox email (FK)
}Database Relationships
users ←─── users_to_inbox ───→ inbox
↑
accountsState Management
Folders Store (stores/folders.js):
sharedInboxes: Array of shared inbox objectspersonalInboxes: Static array of personal viewsselectedFolder: Current inbox IDselectedFolderName: Display namefetchFolders(): Sync accounts from APIselectFolder(id): Switch active inbox
Inbox Object:
{
id: number, // Account ID
name: string, // Display name
address: string, // Email address
icon: string, // Icon identifier
users: User[] // Users with access
}Access Control Logic
Backend Validation:
- Extract user from JWT
- Query
accountstable for user + inbox - If no record found → 403 Unauthorized
- Check
users_to_inboxfor access - If no access → 403 Unauthorized
- Proceed with request
Assignment Validation:
- Fetch inbox and user list
- Check if assignee in
users_to_inbox - If not → 400 Bad Request
- Proceed with assignment
Icon Assignment Logic
if (/support/i.test(name)) icon = 'bi:headset'
if (/billing/i.test(name)) icon = 'bi:cash-coin'
if (/travel/i.test(name)) icon = 'bi:airplane-engines'
if (/abuse/i.test(name)) icon = 'bi:ban'
if (/info/i.test(name)) icon = 'bi:info-circle'
// Default: generic inbox iconPerformance
- Accounts cached in database (not fetched every time)
- Sync only on app launch and JWT refresh
- Optimistic UI updates for folder selection
- Lazy loading of thread list per inbox
- Background sync every 5 minutes (future)
Dependencies
- App Suite core for accounts API
- Thread Management (threads belong to inboxes)
- Assignment Workflow (access control)
- Authentication (JWT from switchboard)
Known Limitations
- No admin UI to manage access or create inboxes. Shared accounts and their grants are provisioned by the App Suite administrator (see Setting Up a Shared Inbox).
- The member list of a shared inbox grows as grantees open Teams; a grantee who has never opened Teams is not offered as assignee yet.
- No inbox-level settings or configuration
- No inbox search or filtering
- Sync errors not retried automatically
Future Enhancements
- Inbox Settings: Configure inbox-specific settings
- Access Management: Add/remove users from Teams UI
- Inbox Creation: Create shared inboxes without leaving Teams
- Nested Folders: Support subfolder hierarchy
- Inbox Search: Search across all inboxes
- Inbox Stats: Thread count, unread count, response time
- Inbox Rules: Automation rules per inbox
- Inbox Templates: Response templates per inbox
- Background Sync: Periodic account sync
- Inbox Notifications: Per-inbox notification settings
Related Features
- Thread Management (threads scoped to inboxes)
- Assignment Workflow (access control for assignments)
- Email Integration (mail sync per inbox)
- Real-time Collaboration (shared access)
Related ADRs
- ADR-0006: Database layer for storing accounts/inboxes
- ADR-0010: OIDC client credentials grant for authentication
- ADR-0016: Shared IMAP folders as shared inboxes
- ADR-0027: Discovering shared accounts through the middleware shared account API
Success Metrics
- Account sync completes in < 3 seconds (p95)
- 100% accuracy in access control (no unauthorized access)
- Zero data leakage between inboxes
- 90% of teams use multiple shared inboxes
- Average 5-10 team members per shared inbox
- Sync success rate > 99%
- User can switch inboxes in < 1 second

