How to exclude the AD groups/any from the teams view workspace list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
HI Community,
Currently teams view in workspace shows all the groups the user is a member of. AD groups should be excluded from the list
How can we achieve this is that we can add filter like that?
I only want actually groups to be displayed the users are part of
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Suuriyas,
This is a common requirement in Service Operations Workspace (SOW). The "Teams" landing page (which is selected in your screenshot) typically pulls all groups where the logged-in user is a member.
To filter out AD groups, you have two approaches: the "Data Best Practice" way (recommended) or the "Customization" way (via UI Builder).
Approach 1: The Best Practice (Group Types)
ServiceNow uses the Type field on the Group form to distinguish between "Working Groups" (Incidents, Changes) and "Access Groups" (AD/LDAP permissions).
The "Teams" view often prioritizes or filters based on these types.
Open one of your AD Groups in the backend (sys_user_group.list).
Check the Type field.
Solution: AD groups should not have the type Assignment, ITIL, or Catalog. They should generally have a blank Type or a custom "AD/Access" type.
If you remove the Assignment type from your AD groups, they often disappear from Operational Views automatically, keeping your workspace clean without code changes.
Approach 2: Add a Filter (UI Builder)
If you cannot change the group data, you must modify the query on the Workspace page itself.
Warning: This involves editing the SOW page in UI Builder. This is considered a customization and updates to this specific page might be skipped in future ServiceNow upgrades.
Navigate to Now Experience Framework > UI Builder.
Open the Service Operations Workspace experience.
In the Pages menu, search for and select the Teams page (sometimes named "Your teams").
On the left panel, look for Data Resources.
You are looking for a resource named something like "My Teams" or "Look Up Records" that queries the sys_user_group table.
In the configuration panel (right side), find the Filter Conditions or Encoded Query field.
Add your exclusion logic.
Example: Source does not start with ldap: AND Active is true.
Or: Type contains Assignment.
Save the page.
This will force the Workspace to only load the groups that match your new filter criteria.
If this solution helps you clean up your Teams view, please mark it as Accepted Solution.
Best regards,
Brandão.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
HI @Itallo Brandão ,
Thanks for the response.
For AD Groups we have a type called ad imported tagged to all ad groups. So in filter i can add group type is not/does not contain ad import i can do that.
But to add filter the only way to do is by configuring the UI Builder?
Because it is saying read only and im not able to edit it
Is this the correct one to edit under data resources i can see the somethings named as filter this is the one i need to update?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @suuriyas ,
You are encountering the "Read-only" message because this is a protected Out-of-the-Box page. To apply your filter, you must follow the standard UI Builder workflow of creating a Variant.
Step 1: Make the Page Editable (Create a Variant) Since you cannot edit the "Teams SNC" page directly:
In the UI Builder header (top left), next to the page name "Teams", click the Menu (three dots) or look for a "Create Variant" button.
Choose to Duplicate the current page (this copies all existing components so you don't start from zero).
Name it (e.g., "Teams Filtered").
Important: You must set an Audience or Order (lower number = higher priority) so the system loads your page instead of the original one.
Step 2: Where to Apply the Filter? In your screenshot, you highlighted "Teams Filter Handler" under Client scripts. This is incorrect. That is a script for browser logic. You need to filter the Data fetching.
Look at the Data resources section (above Client scripts).
Click on "SOW Team management" (or potentially "Team provisioning").
In the configuration panel on the right, look for input fields named "Filter", "Encoded Query", or "Condition".
Add your condition there: Type does not contain ad imported.
Note: If "SOW Team management" is a complex composite resource without a filter input, you might need to check if the List Component on the main screen (Card Body Container > Container 2...) allows you to bind a filter directly to it.
Is UI Builder the only way?
Yes, for Workspace specific views: Since you want to hide these groups only in the Workspace Teams view (but likely keep them visible in the backend/platform for admin purposes), UI Builder is the correct and only targeted way.
Global Alternative (Not Recommended): You could create a "Before Query" Business Rule to hide these groups everywhere in the system, but that would likely break other processes. Stick to the UI Builder Variant method.
Summary:
Create a Variant of the page to bypass the Read-only lock.
Apply the filter in the Data Resource (SOW Team management), not the Client Script.
If this solution helps you clean up your Teams view, please mark it as Accepted Solution.
Best regards, Brandão.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
HI @Itallo Brandão ,
Thanks
I duplicate the UI Builder and when i click sow team management under configure i can see filter and when i select that it show something like this
selected filter (0)like this and here i see 2 filter 0 and 1 (below screenshot)
Im assuming 0 will be correct one as filter 1 is null and in filter 0 there is filter condition i can see but i'm not able to edit it
And i opened the JSON tab i believe here i need to update the condition but i'm not able to edit it.
FYI, i'm trying it in global scope not sure whether it is scope issue or not but tho i duplicated it cant able to edit it
I have admin role.
Thanks in Advance
