But you don't want to delete things that still have a useful life after the add-in is gone: if a list or website created by your App Installed handler is still going to be used, don't delete it in your App Uninstalling handler.

The App Upgraded event runs immediately after Share Point has finished everything that it needs to do when the add-in is updated to a new version, but before the user is notified that updating is complete.

Additionally, I am getting the following error when "new Item.

itemupdating event handler-19

The App Uninstalling event is synchronous and you can use it to cancel the uninstallation, which would leave the add-in in the second stage recycle bin.

The main purpose of a handler for this event is to delete or recycle things that were deployed with an App Installed (or an App Updated) handler.

Add-in events are also handled by remote web services, but they are configured differently in the add-in package from list and list item RERs, so they are treated as a separate category of component.

For an add-in event, the remote web service is registered in the add-in manifest, not in an add-in web feature.

Second, a user must remove the add-in from the second stage recycle bin.

This last task triggers the App Uninstalling event.

Workflows cannot be triggered by add-in events, so add-in events cannot be handled with a Share Point-hosted add-in.

To handle list and list item events, you create remote event receivers (RERs), which are web services that run externally to the Share Point farm or Share Point Online.

For more information, see Include rollback logic and "already done" logic in your add-in event handlers.