I have a client using SharePoint Online that I have developed a custom theme and custom stylesheet for. The goal is to have the styles and theme applied to the root site, subsites, and be provisioned for any newly created sites. I am trying to stick with the best practices of not using custom master pages or the feature framework as I want my client's solution to be stable for them in the long term with minimal maintenance.

I do not have the ability to use a provider hosted app as they do not have the resources for additional server space to run it. This has ruled out the use of remote provisioning or many of the available Office Dev PnP solutions.

I have attempted to use a SharePoint hosted app to apply the custom pieces but it is unable to act on the web provisioned event so I am unable to apply the customizations to newly created sites.

I have also attempted to use Alternate CSS URL's for the stylesheet but this only applies to subsites when manually selected to do so and it does not automatically apply to new sites.

I have been researching and thinking of potential ways provision the branding given my constraints but I can't come up with a viable solution.

Any help you can offer would be greatly appreciated, thanks!

  • Without a provider hosted app you will not be able to do this automatically Oct 20, 2015 at 19:16
  • A sandbox solution is the only other thing I can think of, and I don't know if it will 100% Oct 20, 2015 at 20:27

1 Answer 1


You can certainly build a provider-hosted app that is not hosted in a web site. It can be a WinForms app, a Console App, or just about anything you can think of. You can execute it from your own machine or deploy it as a Windows Service somewhere, or hand it off to your IT folks.

You just need to manually hook up some of the tooling Visual Studio does for you on a standard app project template. Create a new App ID and secret using AppRegNew.aspx, and add the Nuget package AppForSharePointOnlineWebToolkit inside your project. The only difficult part is defining the permissions manifest, which you'll have to do by hand. The MSDN article referenced below has some details on that.



Alternately you can bypass the whole App structure altogether and just write a CSOM-powered application of your choice using stored credentials.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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