OneDriveEventsProcessor

The Microsoft Graph API allows you to register event handlers, so that notifications are sent to a web server when various events take place. The OneDriveEventsProcessor is a NiFi Ingest processor that handles these events.

The processor supports the following Graph API subscriptions:

  • Drive changes (supports multiple drives and users)

There are many use cases for this processor - for example you could use it to ingest new files as soon as they are created (real-time ingestion), rather than having a connector retrieve the files at regular intervals. You could also create a dataflow that scans files for personal information (PII) or performs some other kind of custom processing on each new file.

To receive notifications from Microsoft, you must have a public-facing web server with a trusted SSL certificate. The OneDriveEventsProcessor starts its own web server but you must provide the certificate, and you might want to set up a reverse proxy.

The processor produces FlowFile documents that are compatible with the OneDrive Connector processors. Due to API limitations, the events received by the processor do not contain details of the specific item(s) that changed. On notification of a drive change, the events processor produces a FlowFile document for the drive, which you can route to a GetOneDrive processor to perform a SynchroizeIds task to retrieve the changed items.

NOTE: For this workflow to function correctly and retrieve only the changed items for each drive, you must perform a full synchronize of all subscribed drives before subscribing to drive changes. For information about how to start a synchronize run by sending a FlowFile to your GetOneDrive processor (with the attribute idol.get.action=synchronize), see Synchronize with a Repository.

Properties

Name Description
IDOL License Service

An IdolLicenseServiceImpl that provides a way to communicate with a Knowledge Discovery License Server.

Event Types

A comma-separated list of event types to request from Microsoft OneDrive. You can choose from the following options:

  • updated
Event Web Server Host The processor starts a web server to receive event notifications from Microsoft. This parameter specifies the host name to bind to.
Event Web Server Port The processor starts a web server to receive event notifications from Microsoft. This parameter specifies the port number to use.
OAuth site name The processor must be able to use the Microsoft Graph API. To configure OAuth authentication, right-click the processor and click Advanced, and then follow the instructions on the GUIDED SETUP tab.
OAuth sites file The processor must be able to use the Microsoft Graph API. To configure OAuth authentication, right-click the processor and click Advanced, and then follow the instructions on the GUIDED SETUP tab.
Proxy Configuration Service A ProxyConfigurationServiceImpl to use when connecting to the Microsoft Graph API. The processor has to register the Event Web Server with Microsoft.
SSL Config Service An IdolSSLConfigServiceImpl to use to configure the SSL settings for the Event Web Server. The web server must have a trusted SSL certificate (not a self-signed certificate).
Event Web Server Max Request Size The maximum size (in bytes) for incoming requests to the web server.
Event Web Server Threads The number of threads to use for processing incoming requests.
Event Web Server Trace Logging Enabled To log debug-level information about incoming requests, set this property to TRUE.
Event Web Server Use SSL To configure the events web server to accept secure connections, set this property to TRUE.
ExplicitUsers An explicit list of users whose drives you want to monitor for events. If you set this property, UserCantHaveRegex and UserMustHaveRegex are ignored.
Process all user drives Specifies whether to process events from the drives of all enabled users in a OneDrive for Business environment. When False, the connector only processes drives specified by ExplicitUsers or that pass the filters set with UserCantHaveRegex and UserMustHaveRegex.
Receiver Expiry If the Receiver URL is not available for this time duration, Microsoft removes the subscription (no further events are sent).
Receiver URL The URL for Microsoft to send events to.
UserCantHaveRegex A regular expression to limit the users to process. If the user identifier of a user matches the regular expression, the user is ignored.
UserIdentifier

The type of identifier to use for identifying users. You can choose one of the following options:

  • PrincipalName
  • Email
UserMustHaveRegex A regular expression to limit the users to process. The user identifier of a user must match the regular expression, otherwise the user is ignored.

Relationships

Name Description
updated FlowFiles that represent something being updated in Microsoft OneDrive.
success Successfully handled ProcessEvent FlowFiles.
failure Unsuccessfully handled ProcessEvent FlowFiles.