none
Can I use $search and $filter in a single request in Microsoft Office Graph API? RRS feed

  • Question

  • I'm trying to get a list of messages from outlook through Microsoft Graph API by a query with $search and $filter parameters. I need to get all the messages based on my search criteria and the messages createdDateTime should be greater than the date I sent in the query.

    The URL I'm using for the request is:

    https://graph.microsoft.com/v1.0/me/messages?$search=Sharepoint&$filter=createdDateTime gt  2018-01-11T05:00:00Z`
    

    But I am getting this error:

    {
        "error": {
            "code": "SearchWithFilter",
            "message": "The query parameter '$filter' is not supported with '$search'.",
            "innerError": {
                "request-id": "dabaeb5f-9b89-4370-9e79-c64c4a10ed5f",
                "date": "2018-01-23T08:57:50"
            }
        }
    }

    Is there a problem with my URL, or is there another way to make the request?

    Tuesday, January 23, 2018 10:50 AM

All replies

  • Hi Avinash Gandavarapu,

    I can see that your issue is related with Graph API.

    This forum only handles issues regarding Outlook VBA Object Model.

    So for better response and better solution for your issue, I move this thread to Office 365 Developers Forum.

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.

    Thank you for your understanding.

    Regards,

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, January 24, 2018 5:29 AM