SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to get all masterpages in client object model. For classic lists and libraries, I use


How do I do that to get the masterpage list (_catalogs/masterpage) ?

Thanks in advance.

share|improve this question
up vote 2 down vote accepted

The Title of the list is "Master Page Gallery". Remember that, that lists also contains things other than the master pages. For example, Page Layouts, images for the page layouts etc.

The link below shows how to filter master pages:

share|improve this answer
Thanks, it works. For other reasons, I ended up doing context.Web.GetFolderByServerRelativeUrl("_catalogs/masterpage"). Mainly because I'd rather have a Folder object. – Nico Jan 26 '12 at 14:41

Another good way of getting a SharePoint Catalog is:

var value = SP.Site.getCatalog(116);

As described here (TypeCatalog enumeration)

share|improve this answer

In the root web context, try:

context.Web.Lists.GetByTitle("Master Page Gallery")

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.