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 )

1 Answer 1

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.

2
  • would you please tell me how to use this event ? Commented Apr 27, 2015 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. Commented Apr 27, 2015 at 16:44

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.