0 minute read
I’m working in a SharePoint 2013 on premises installation, and I needed to get the ContentType back from a REST call. Content Type is often the most important piece of metadata in a list or library, with the detailed metadata for the Content Type coming in as secondary. It certainly matters which Content Type you have if you’re building custom UIs like I am.
On SharePoint Online, this works:
But on premises, it doesn’t. Nothing comes back for the ContentType at all.
Simply add ContentTypeId to the $select and you’re in business:
We shouldn’t need to do this sort of workaround, but it’s great when we can!