How to use contains string in filter criteria in microsoft graph api?

Pradhaan, Surrya 0 Reputation points

I am using graph api to search product list from sharepoint.

I am able to search product using startsWith function but my requirement is to search product using any keyword which contains product name.

I am currently using below url statsWith function to search product.{siteId}/lists/{listId}/items?select=fields&expand=fields(select=Title,Product_Description,Product_x0020_Portfolio,Product_Manager_txt)&$filter=startsWith(fields/Title,'Auto')

but i need to search product any keyword from the product name .

When i use key word contains it throws error contains key{siteId}/lists/{listId}/items?select=fields&expand=fields(select=Title,Product_Description,Product_x0020_Portfolio,Product_Manager_txt)&$filter=contains(fields/Title,'Auto')



    "error": {

        "code": "itemNotFound",

        "message": "Item not found",

        "innerError": {

            "date": "2024-05-08T20:26:09",

            "request-id": "2fc2e894-9435-4320-a036-c53ab4ff4f4b",

            "client-request-id": "c7892a64-3dc8-e409-8292-abbe0c38fce1"




Please Help me to solve my issue and fulfill my requirement

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,726 questions
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 32,246 Reputation points Microsoft Vendor

    Hi @Pradhaan, Surrya

    Per my research, list item doesn't support contains. You could refer to following issue similar with yours


    As a workaround, you could use rest api to Realize the contain function. Please refer to following api


    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.