How to get master page gallery via CSOM so that we would support language packs / we cannot use Lists.GetByTitle("Master Page Gallery").
So how to get list "_catalogs/masterpage"?
How to get master page gallery via CSOM so that we would support language packs / we cannot use Lists.GetByTitle("Master Page Gallery").
So how to get list "_catalogs/masterpage"?
Use Site.GetCatalog method with ListTemplateType.MasterPageCatalog to retrieve Master Page gallery:
var list = context.Site.GetCatalog((int)ListTemplateType.MasterPageCatalog);
context.Load(list);
context.ExecuteQuery();
Console.WriteLine(list.Title);
Note: SharePoint 2010 & 2013 compatible
/_api/Web/GetCatalog(116)will work as well – eirikb Apr 17 '14 at 09:45