Skip to content

Latest commit

 

History

History
84 lines (69 loc) · 2.47 KB

search-concept-bookmark.md

File metadata and controls

84 lines (69 loc) · 2.47 KB
title description author ms.localizationpriority ms.subservice
Use the Microsoft Search API to search bookmarks
Find out how to use the Microsoft Search API in Microsoft Graph to search bookmarks.
njerigrevious
medium
search

Use the Microsoft Search API to search bookmarks

You can use the Microsoft Search API in Microsoft Graph to search bookmarks. Administrators can create bookmarks in the Microsoft 365 admin center or via the Create bookmark API.

[!INCLUDE search-schema-updated]

After bookmarks are created, to search for them, in the searchRequest, in the entityTypes property, specify bookmark as the value.

Example: Search bookmarks

Request

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

{
  "requests": [
    {
      "entityTypes": [
        "bookmark"
      ],
      "query": {
        "queryString":"Yammer"
      }
    }
  ]
}

Response

HTTP/1.1 200 OK
Content-type: application/json

{
  "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#search",
  "value": [
  {
   "@odata.type": "#microsoft.graph.searchResponse",
   "hitsContainers": [
    {
     "@odata.type": "#microsoft.graph.searchHitsContainer",
     "hits": [
      {
       "@odata.type": "#microsoft.graph.searchHit",
       "hitId": "a9f59c69-f4a1-42ac-820e-0f35114300f8",
       "rank": 1,
       "resource": {
          "@odata.type": "#microsoft.graph.search.bookmark",
          "id": "a9f59c69-f4a1-42ac-820e-0f35114300f8",
          "displayName": "Yammer",
          "description": "Yammer is a collaboration tool that helps you connect and engage across the company. Start conversations, share knowledge, and build communities.",
          "webUrl": "https://www.yammer.com/office365",
        }
       }
      }
     ],
     "total": 1,
     "moreResultsAvailable": false
    }
   ]
  }
 ]
}

Known issues

  • Sorting, aggregation and pagination aren't supported for bookmark searches.
  • Combination searches with non-answer entity types (for example, driveItem and list) aren't supported. Only combination searches with the other answer entity types bookmark, qna, and acronym are supported.

Next steps