Skip to content

Allow only sync users from a group#3202

Open
weilai-irl wants to merge 1 commit into
wip-131037-m405from
wip-127698-m405
Open

Allow only sync users from a group#3202
weilai-irl wants to merge 1 commit into
wip-131037-m405from
wip-127698-m405

Conversation

@weilai-irl

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings May 27, 2026 16:18
@weilai-irl weilai-irl self-assigned this May 27, 2026
@weilai-irl weilai-irl added this to the 2026-03 milestone May 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces an admin-configurable “user sync group filter” so user synchronization (and photo/timezone sync) can be restricted to members of a specific Microsoft 365 group, and enhances photo sync efficiency by hashing batch-fetched photos to avoid unnecessary updates.

Changes:

  • Added an “User sync group filter” admin setting (GUID) and wiring to drive user sync batching from /groups/{id}/members.
  • Updated user sync / photo+timezone sync tasks to surface group-filter info in logs and to apply group membership filtering.
  • Extended photo batch API responses with a SHA-256 hash and updated photo-apply logic to skip writes when hashes match.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
local/o365/settings.php Registers the new admin setting for the group filter under user sync settings.
local/o365/lang/en/local_o365.php Adds UI strings for the new setting (label/description/validation string).
local/o365/classes/task/usersync.php Logs group filter status and adjusts displayed sync options list.
local/o365/classes/task/photoandtimezonesync.php Applies group filtering to photo/timezone sync processing and uses photo hash to reduce updates/log noise.
local/o365/classes/rest/unified.php Adds batched group member processing APIs and includes photo hashes in batch responses.
local/o365/classes/feature/usersync/main.php Routes user batching through group-member endpoints; adds optional photo-hash compare to skip reprocessing.
local/o365/classes/adminsetting/usersyncgroupfilter.php Implements the validated configtext setting for GUID input.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread local/o365/classes/rest/unified.php Outdated
Comment thread local/o365/classes/rest/unified.php Outdated
Comment thread local/o365/classes/rest/unified.php
Comment thread local/o365/classes/feature/usersync/main.php Outdated
Comment thread local/o365/classes/task/photoandtimezonesync.php
Comment thread local/o365/classes/adminsetting/usersyncgroupfilter.php Outdated
Comment thread local/o365/lang/en/local_o365.php Outdated
Comment thread local/o365/classes/feature/usersync/main.php
Comment thread local/o365/classes/task/photoandtimezonesync.php Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Fetch-level filtering in user sync — avoid downloading entire tenant

2 participants