---
created: 2026-04-07T07:31:00.755Z
title: Add global multi-site selection option
area: ui
files:
  - SharepointToolbox/Views/Dialogs/SitePickerDialog.xaml.cs
  - SharepointToolbox/ViewModels/Tabs/PermissionsViewModel.cs
  - SharepointToolbox/ViewModels/Tabs/StorageViewModel.cs
  - SharepointToolbox/ViewModels/Tabs/SearchViewModel.cs
  - SharepointToolbox/ViewModels/Tabs/DuplicatesViewModel.cs
---

## Problem

Currently each feature tab (Permissions, Storage, Search, Duplicates) has its own site URL input and optional "View Sites" picker. Users who want to run operations across multiple sites must re-select sites on each tab independently. A global multi-site selection (e.g., in the toolbar or a shared panel) would let users pick their target sites once and have all tabs operate on that selection.

This would streamline the MSP workflow where administrators typically audit the same set of sites across permissions, storage, and search in one session.

## Solution

- Add a shared `SelectedSites` collection on `MainWindowViewModel` (or a dedicated `SiteSelectionService`)
- Add a toolbar button or sidebar panel for global site selection using `SitePickerDialog`
- Broadcast selection changes via `WeakReferenceMessenger` (similar to `TenantSwitchedMessage`)
- Each feature ViewModel subscribes and uses the global selection as default, with option to override per-tab
- Preserve per-tab site URL override for single-site operations
