3

I have a office365/SharePoint Online App (SharePoint Hosted App) that when installed into SharePoint Online, it will provision some static files (css/js) and custom actions into the SharePoint host web.

The problem is when the user tries to Remove the application from SharePoint host, my provisioned files will remain installed and active, unless the user goes to a specific app page, and clicks a custom uninstall button at my app web ( not to mention that he has to click it before Removing the application itself! )

Is there any clean way that I can run my un-installation logic ( to remove those provisioned files ) when the user Removes the App ?

Note that proposed solution has to be completely client side ? ( we cannot go with provider hosted solutions )

2

Not really.

When a user removes a SharePoint-Hosted app in SharePoint Online, it goes into the recycle bin and the uninstall event does not fire. The uninstall event will fire when the app has been removed from both stages of the recycle bin.

  • would you please tell me how to use this event ? – Jamal Madani Apr 27 '15 at 16:12
  • 2
    Sorry - I just noticed your comment about completely client side. Handling events requires a remote event receiver which is, in effect, a Provider-Hosted App. If you are completely client side then there's no way to automatically run clean-up code. – Rob Windsor Apr 27 '15 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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