Hide service account from searches across M365 apps

Mohammad Imran 0 Reputation points
2023-09-05T12:59:40.81+00:00

Hide service account from searches across M365 apps

if someone try to search over MS Teams client apps or web base hide service account and also others Microsoft apps SharePoint, OneDrive etc.

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
3,690 questions
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
8,988 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,515 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Mason Wheare 70 Reputation points
    2023-09-06T01:26:37.1166667+00:00

    To hide a service account from searches in Microsoft 365 apps, you can adjust the account's settings to exclude it from directory searches or address books. Specific steps may vary depending on the app and version you're using, but generally:

    In Microsoft Teams:

    • Go to the Teams admin center.
    • Navigate to "Org-wide settings" and then "General."
    • Modify the "Search" settings to exclude the service account from searches.
    1. In SharePoint and OneDrive:
    • Access SharePoint admin or OneDrive admin settings.
    • Configure the user profile properties to exclude the service account from search results.
    0 comments No comments

  2. Ling Zhou_MSFT 12,490 Reputation points Microsoft Vendor
    2023-09-06T07:21:43.8+00:00

    Hi @Ikhan210,

    Thank you for posting in this community. Also, thanks to Mason Wheare for the answer, that was very helpful.

    I will add to Mason Wheare's answer here.

    To hide a service account from searches In SharePoint:

    1.Go to Microsoft 365 admin center -> Active Users -> User – Edit -> Mail -> Show in global address list. Uncheck "Show in my organization address list".

    User's image

    User's image

    2.Please go to SharePoint Admin Center->More Features-> open Search->Manage Result Sources.

    First, copy Local Reports Results.

    User's image

    Second, name this result source and click Query Transfer (Launch Query Builk), add -AccountName:"your service account name" after Query text. You can click "Test query " to test.

    User's image

    Third, set your results source to default. This setting takes a long time to take effect (possibly up to several hours), so please be patient.

    User's image

    Since our team is dedicated to SharePoint, we provide a way to exclude service accounts from being searched in SharePoint, and since there are other apps in M365, you can wait for other teams to answer.

    Thanks for your kind understanding.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.