@ vasanthkumar-2816
There are two suggestions:
1.You could create two groups based on users identity (contract user and permanent user). And then grant permissions to view the files/items based on the group membership.
2.Restricting Office 365 Content Searches with Permission Filters.
For better understanding Permission Filters for SharePoint, please refer to: https://petri.com/restricting-office-365-content-searches.
“A permission filter creates a restrictive view of mailboxes or SharePoint and OneDrive sites within a tenant. When users that conduct searches come within the scope of a permission filter, they cannot see any data returned by searches except that given by the restrictive view.”
You could refer to this article Creating and Managing Security and Compliance Filters in the Real World.
Thanks,
Echo Du
============
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.