I would like to reproduce the "Save site as template" action with the client object model. Can someone give me a hint how to do this?


1 Answer 1


The short answer is "Save site as template" is not possible with the client object model (it IS possible with the server object model).

If you look at the Microsoft.SharePoint.Client.Web class you'll see it doesn't have a SaveAsTemplate method like the server-side SPWeb class does.

Although I'm not familiar with these techniques, this may be a workaround:


  • Thank you. I guess, there's no way to run code based on the server object model from the client side, even if I am site collection admin?
    – vilmarci
    Commented Dec 4, 2015 at 14:51
  • 1
    One way you could run server side code from the client side is to develop a web service (server side code required). The web service would call the SPWeb.SaveAsTemplate method and would take in the parameters that the SaveAsTemplate method needs. Or if you're able to develop a server side solution then just create an application page with code behind that calls SaveAsTemplate. If developing server side code/solution isn't an option for you then I'm afraid you're stuck.
    – Submits
    Commented Dec 4, 2015 at 14:53
  • Sounds bad( No way to save web as template vias JSOM?..
    – Gennady G
    Commented Feb 3, 2017 at 17:58

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