Archive 5 phases (36 plans) to milestones/v1.0-phases/. Archive roadmap, requirements, and audit to milestones/. Evolve PROJECT.md with shipped state and validated requirements. Collapse ROADMAP.md to one-line milestone summary. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
8.1 KiB
phase, plan, subsystem, tags, requires, provides, affects, tech-stack, key-files, key-decisions, patterns-established, requirements-completed, duration, completed
| phase | plan | subsystem | tags | requires | provides | affects | tech-stack | key-files | key-decisions | patterns-established | requirements-completed | duration | completed | |||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 04-bulk-operations-and-provisioning | 04 | bulk-operations |
|
|
|
|
|
|
|
|
|
7min | 2026-04-03 |
Phase 04 Plan 04: BulkMemberService Implementation Summary
GraphClientFactory bridges MSAL PCA with Graph SDK, BulkMemberService adds M365 Group members via Graph API with CSOM fallback for classic SharePoint groups
Performance
- Duration: ~7 min
- Started: 2026-04-03T07:57:11Z
- Completed: 2026-04-03T08:04:00Z
- Tasks: 2
- Files modified: 3
Accomplishments
- GraphClientFactory creates GraphServiceClient from existing MSAL PCA using MsalTokenProvider bridge with Graph scopes
- BulkMemberService resolves M365 Group via site URL, adds members/owners via Graph API, falls back to CSOM for classic SP groups
- Per-row error handling delegated to BulkOperationRunner with continue-on-error semantics
Task Commits
Files were committed across prior plan execution sessions:
- Task 1: Create GraphClientFactory —
ac74d31(feat(04-03): implements GraphClientFactory.cs) - Task 1: Create BulkMemberService —
b0956ad(feat(04-05): implements BulkMemberService.cs with Group ambiguity fix) - Task 2: Create BulkMemberServiceTests —
ac74d31(feat(04-03): includes BulkMemberServiceTests.cs scaffold)
Plan metadata: [this commit] (docs: complete plan)
Files Created/Modified
SharepointToolbox/Infrastructure/Auth/GraphClientFactory.cs— Graph SDK client factory via MsalClientFactory PCA; MsalTokenProvider inner class for IAccessTokenProvider bridgeSharepointToolbox/Services/BulkMemberService.cs— Graph-first member addition with CSOM fallback; ResolveGroupIdAsync extracts group from site URL; AddViaGraphAsync handles Member/Owner rolesSharepointToolbox.Tests/Services/BulkMemberServiceTests.cs— 3 unit tests (type check + BulkMemberRow defaults + properties), 3 skipped (live tenant required)
Decisions Made
GetOrCreateAsync(async) used instead of the plan'sGetOrCreateClient(sync) — the actualMsalClientFactorymethod is async withSemaphoreSlimlocking; plan contained incorrect sync referenceusing AuthGraphClientFactory = SharepointToolbox.Infrastructure.Auth.GraphClientFactory;alias —Microsoft.Graph.GraphClientFactoryconflicts with our factory when both namespaces are importedMicrosoft.SharePoint.Client.Group?fully qualified inAddToClassicGroupAsync—Microsoft.Graph.Models.Groupalso in scope; explicit namespace resolves CS0104
Deviations from Plan
Auto-fixed Issues
1. [Rule 1 - Bug] GetOrCreateAsync vs GetOrCreateClient — plan had wrong method name
- Found during: Task 1 (GraphClientFactory creation)
- Issue: Plan referenced
_msalFactory.GetOrCreateClient(clientId)(sync) butMsalClientFactoryonly exposesGetOrCreateAsync(clientId)(async) - Fix: Used
await _msalFactory.GetOrCreateAsync(clientId)inGraphClientFactory.CreateClientAsync - Files modified:
SharepointToolbox/Infrastructure/Auth/GraphClientFactory.cs - Verification:
dotnet build SharepointToolbox.slnx— Build succeeded 0 errors - Committed in:
ac74d31
2. [Rule 1 - Bug] CS0104 — GraphClientFactory name collision with Microsoft.Graph.GraphClientFactory
- Found during: Task 1 (build verification)
- Issue: Both
SharepointToolbox.Infrastructure.Auth.GraphClientFactoryandMicrosoft.Graph.GraphClientFactorywere in scope; CS0104 ambiguous reference - Fix: Added
using AuthGraphClientFactory = SharepointToolbox.Infrastructure.Auth.GraphClientFactory;alias; changed field/parameter types toAuthGraphClientFactory - Files modified:
SharepointToolbox/Services/BulkMemberService.cs - Verification:
dotnet build SharepointToolbox.slnx— Build succeeded 0 errors - Committed in:
b0956ad
3. [Rule 1 - Bug] CS0104 — Group type collision between Microsoft.SharePoint.Client.Group and Microsoft.Graph.Models.Group
- Found during: Task 1 (build verification)
- Issue:
Group? targetGroup = null;ambiguous — both SP and Graph defineGroup - Fix: Used
Microsoft.SharePoint.Client.Group? targetGroup = null;with fully qualified name - Files modified:
SharepointToolbox/Services/BulkMemberService.cs - Verification:
dotnet build SharepointToolbox.slnx— Build succeeded 0 errors - Committed in:
b0956ad
Total deviations: 3 auto-fixed (3 x Rule 1 - compile bugs) Impact on plan: All three fixes were required for the project to compile. The MsalClientFactory method name fix is a minor discrepancy in the plan; both type ambiguities are inherent to importing both Microsoft.SharePoint.Client and Microsoft.Graph.Models in the same file.
Issues Encountered
The WPF SDK incremental build generates temp project files (*_wpftmp.*) that caused misleading "Copying file" errors on first invocation. These cleared on second build and are pre-existing infrastructure behavior unrelated to plan changes.
User Setup Required
None — BulkMemberService requires Graph API permissions (Group.ReadWrite.All) at runtime via the existing MSAL interactive auth flow. No new service configuration needed at setup time.
Next Phase Readiness
GraphClientFactoryis available for any future service requiring Microsoft Graph SDK accessBulkMemberServiceis ready for DI registration in Plan 04-09 (ViewModels and wiring)- Tests pass: 3 pass, 3 skip (live SP/Graph integration tests excluded from automated suite)
dotnet build SharepointToolbox.slnxsucceeds with 0 errors
Self-Check: PASSED
- GraphClientFactory.cs: FOUND
- BulkMemberService.cs: FOUND
- BulkMemberServiceTests.cs: FOUND
- Commit
ac74d31: FOUND (GraphClientFactory + BulkMemberServiceTests) - Commit
b0956ad: FOUND (BulkMemberService) - 04-04-SUMMARY.md: FOUND (this file)
Phase: 04-bulk-operations-and-provisioning Completed: 2026-04-03