Event for app web created in SharePoint Hosted Apps RRS feed

  • Question

  • We have enabled SharePoint hosted apps in our on prem environment. In our site collection, the master page setting is set to 'Set a system master page for this site and all sites that inherit from it' to our custom master page.

    So, when we install a SharePoint hosted app it tries to set the master page to the custom master page in the app web and throws an error since it doesn't find it.

    I want to set the default out of box master page for the app web. Is there any event I can tap into? I tried the app installed event handler and it creates another web project like a provider hosted app and also doesn't seem to fire in my case. The normal web created event handler is not firing when app web is created.

    Prashanth Padebettu
    The SharePoint Guide

    Thursday, October 15, 2015 4:13 PM


  • Hi,

    Based on your description, you might want to set custom master page for SharePoint hosted app host web only and you want to set the default master page for the SharePoint app web.

    As I understand, there is no easy way to reset the default master page in app web. As a workaround, I suggest you can provision the custom master page for both app web and host web, and then you can reset the master page for app web using PowerShell.

    You can refer the article below to reset the master page for app web:

    Custom MasterPages and SharePoint Hosted Apps

    About provision custom master page and set for SharePoint host web, you can refer:

    Provison custom master page for app


    Best Regards

    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Monday, October 19, 2015 2:21 AM