Is it possible to restrict an indexed search source(ai search source) by role?

siddhi sawant
Tera Contributor

Hi Everyone,

Global Search returns results only if the user has the correct ACL permissions, but I want to confirm whether index search sources (ais_search_source) themselves can be restricted by role.

Any guidance or best practices would be appreciated!

Thank you.

siddhisawant_0-1763475710932.png

 

8 REPLIES 8

Thank you for you feedback , do you know how to restrict access for external content coming from external connector such sharepoint because on index search source the candition can be set only on index table from sharepoint and no pissibility to perform dotwalk to set restriction based on user for exemple

qprinsloo
Mega Sage

@abdelhakgue , content surfaced to the searching user by AI search will honor the permissions set in SharePoint. That is why you need to perform both a content crawl as well as a user crawl. The user crawl is what ServiceNow uses to determine which documents from SharePoint are presented to the user in AI search. The permissions itself are handled by the source (SharePoint in this case) and just mapped using the user mapping crawl. See the product documentation here - https://www.servicenow.com/docs/r/platform-administration/search-administration/create-user-mapping-...

Thank you for your clarification

sanjaygupta
Giga Guru
 

I'd recommend handling this through content permissions rather than restricting the AI Search source itself.

  • For Catalog Items, configure Available For and Not Available For user criteria.

  • For indexed ServiceNow records, configure the appropriate read ACLs.

  • For SharePoint content, configure both the content crawl and user mapping crawl.

  • Test the search results with users who have different access permissions.

As mentioned in the community replies, AI Search uses the SharePoint user mapping crawl to determine which documents a user can see. SharePoint remains responsible for the actual permissions.

So, for external content, the user mapping crawl is the important part.

 
ServiceNow Community

 

Reference: ServiceNow – Create a user mapping crawl for an external content connector

 
Hope you find this helpful.