Bewerken

Delen via


Set up administrative search answers for users in an organization

Microsoft Search lets administrators associate search terms with meanings or web pages that are specific to their organizations and include these associations as search answers. For example, users in an organization may run into an unfamiliar acronym that represents an internal project name, or a team name that is associated with a team web page. Administrators can set up acronyms, bookmarks, or QnAs in the Microsoft 365 admin center, under Search & intelligence. This enables users to use search to navigate and get familiarized with their work.

Administrators can also use the Microsoft Search API in Microsoft Graph to programmatically manage administrative search answers in the organization. These answers are displayed in Microsoft Search results when triggered by an acronym or keyword defined in the available search answer resource types: acronym, bookmark, and qna resources.

When triggered by a defined acronym or keyword, these search answers appear at the top of the search results page in your organization.

Example 1: Create a new acronym

The following request creates a new acronym that displays on the search results page when a user searches for it.

Request

The following example shows a request.

POST https://graph.microsoft.com/v1.0/search/acronyms
Content-Type: application/json

{
  "displayName": "GDPR",
  "standsFor": "General Data Protection Regulation",
  "description": "A European Union (EU) regulation on data protection and privacy in the EU and the European Economic Area (EEA) that enhances individuals' control and rights over their personal data, simplifies the regulatory environment for international business, and addresses the transfer of personal data outside the EU and EEA areas.",
  "webUrl": "http://contoso.com/GDPR",
  "state": "published"
}

Response

The following example shows the response.

HTTP/1.1 201 Created
Content-Type: application/json

{
  "id": "733b26d5-af76-4eea-ac69-1a0ce8716897"
}

Example 2: Create a new bookmark

The following request creates a new bookmark that displays on the search results page when a user searches for at least one of its keywords.

Request

The following example shows a request.

POST https://graph.microsoft.com/v1.0/search/bookmarks
Content-Type: application/json

{
  "displayName": "Contoso Install Site",
  "webUrl": "http://www.contoso.com/",
  "description": "Try or buy Contoso for Home or Business and view product information",
  "keywords":  {
    "keywords": ["Contoso", "install"],
    "reservedKeywords": ["Contoso"],
    "matchSimilarKeywords": true
  },
  "state": "published"
}

Response

The following example shows the response.

HTTP/1.1 201 Created
Location: /733b26d5-af76-4eea-ac69-1a0ce8716897
Content-Type: application/json

{
  "id": "733b26d5-af76-4eea-ac69-1a0ce8716897"
}

Next steps