SharePoint 2016 REST API: query filtered by ContentType RRS feed

  • Question

  • Hi,
    We're testing that our product properly supports SharePoint 2016, but we're having a problem with queries.

    We've been using the REST API to retrieve the items from a list, filtered by type, as follows:
    In other words, filtering with the query "ContentType eq 'Task'". 

    This worked with the 2013 version of the server, but the 2016 sever returns a 500 error: Internal Server Error: Column 'ContentType' does not exist. It may have been deleted by another user. (-2146232832, Microsoft.SharePoint.SPException)

    We found that filtering by ContentTypeId (with a query such as "ContentTypeId eq '0x0108002840D046B700484FAC17F0F83950DFD7'") achieves what we want, but were hoping for a solution closer to the original, since using ContentTypeId is hard to read.

    Is there a way of filtering by content type like what we did before?


    Wednesday, March 8, 2017 11:26 PM

All replies

  • Hi,

    Here are two workarounds for your reference currently:

    Select content type and expand name by rest API like below, and then filter task item by content type name.


    Or create a simple workflow to copy content type name to custom field( use ‘Call HTTP Web Service’ to get content type name by above rest api ) and then filter tasks by custom field.

    Best Regards,


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact

    Friday, March 10, 2017 9:28 AM