Fix SearchEEEU report button duplication and incorrect search results - #151
Closed
Gunjan Datta (gudatta) with Copilot wants to merge 2 commits into
Closed
Fix SearchEEEU report button duplication and incorrect search results#151Gunjan Datta (gudatta) with Copilot wants to merge 2 commits into
Gunjan Datta (gudatta) with Copilot wants to merge 2 commits into
Conversation
Co-authored-by: gudatta <56934979+gudatta@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Search Report Results Incorrect
Fix SearchEEEU report button duplication and incorrect search results
Aug 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes two critical issues in the SearchEEEU report that were causing UI problems and incorrect search results:
Issues Fixed
1. Button Duplication in Top Site Tab
The "View Group" button was rendering twice when search results contained items with both
ListIdandGroupIdproperties. This occurred due to overlapping conditional logic in the button rendering code:2. Incorrect Search Results for EEEU Accounts
The search filters were incomplete and not properly identifying "Everyone except external users" accounts, causing the report to miss important security findings. The original filters only checked for:
Title eq 'Everyone'substringof('spo-grid-all-users', Name)Solution
Button Logic: Refactored the button rendering to use mutually exclusive conditions that prioritize the most specific context:
Search Filters: Enhanced both role assignment and user information filters to comprehensively identify EEEU accounts:
Filter: `Title eq 'Everyone' or Title eq 'Everyone except external users' or substringof('spo-grid-all-users', Name) or Name eq 'c:0(.s|true'`This ensures the report correctly identifies all variations of "Everyone" and "Everyone except external users" accounts across different SharePoint configurations.
Impact
Fixes #149.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.