0

I'm currently working on a feature for an application where we want to sync files from a SharePoint Online document library to a storage account on Azure.

We've been looking at using SharePoint Online webhooks to do this, but today I stumbled on (what seems to me) the same functionality via MS Graph.

I'm wondering which path is the right one to take? The built-in ability to subscribe to changes in SharePoint Online or the subscription ability in MS graph.

Any insights would be appreciated.

0

You didn't flesh out your requirements so I'll have to make some assumptions:

  1. You want to upload the file to the storage container whenever a new file is added to the library
  2. You want to replace the file in the storage container whenever it's updated in the library
  3. You want to delete the file from the container whenever it's deleted in the library

The first thing you need to do is determine which of the approaches will handle each of these events and give you the data you need to take action. If one of them won't do it, then it's out of the running. If both can do it, then either will work. Both approaches are supported, but the Graph API will be receiving further development, but SharePoint WebHooks appears to be a dead-end technology. If you or your team feels more comfortable with one or the other, then that choice wins.

You have other options as well:

  • Remote Event Receivers - will definitely work and offers the most control
  • A Flow - will also probably work and is probably the easiest to set up
  • A scheduled job that looks for recent updates and applies them (not real-time obviously)

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.