OneDrive Input

Prev Next

Applies to: Lasernet Core 11

This module retrieves files from OneDrive storage.

To set up the module, follow this process:

  1. Configure the module’s authentication.

  2. Provide values for the module’s other properties.

Configure Authentication

Note

Lasernet Core 11.0 and 11.1 support only user authentication.

Lasernet Core 11.2 and later support only application authentication.

Refer to the information for the version of Lasernet Core that you are using.

Lasernet Core 11.0 and 11.1

To configure the module’s authentication, follow these steps:

  1. Click Obtain Authorization. Lasernet Developer redirects you to Microsoft to authorize OneDrive for Lasernet Core.

  2. Enter your Microsoft credentials.

  3. Authorize the access request. The authentication window closes automatically, and then Lasernet Developer automatically completes Display name and E-mail with your details.

This process stores an encrypted token in the configuration. This token is used later to gain access to OneDrive.

Setup tab for the OneDrive input module

Refresh Access Token

If Lasernet Core experiences issues connecting to OneDrive, there might be a problem with its current security tokens. In some cases, the Refresh Access Token button can resolve connection issues.

Connection issues can occur for a number of reasons, including:

  • More than 90 days of inactivity.

  • The user changed their password.

  • Permission or security changes to the user.

  • Revocation of permissions.

If Lasernet Core experiences connection issues, click Refresh Access Token to obtain new tokens, then commit and deploy the Lasernet Core configuration.

If doing this does not resolve the issue, click Remove Authorization to remove the currently stored security tokens, then click Obtain Authorization to reauthenticate using the user account (which will also refresh the security tokens). Then, commit and deploy the Lasernet Core configuration.

Lasernet Core 11.2 and later

Application authentication for OneDrive communication requires that:

  • Lasernet Core is registered as an app by an Entra ID admin.

  • In Entra ID, the app has the Files.ReadWrite.All permission.

  • The Entra ID admin must provide a ClientID and Client Secret for the module to use to sign in.

Important

Before implementing application authentication for this module, see Understand the Security Implications of Application Authentication for Outlook Mail, OneDrive, and SharePoint Modules.

To configure the module’s authentication, follow these steps:

  1. In the Tenant Domain box, click the (three dots) button to specify your domain (for example, microsoft.com).

  2. Enter the correct Client ID and Client Secret.

  3. Click Test Connection.

The Setup tab of the OneDrive input module's Properties window in Lasernet Core 11.2.

Note

If the client ID and client secret change in the future, repeat the steps above, then commit and deploy the Lasernet Core configuration.

At any time, you can click Test Connection to test that the currently provided credentials are valid. When you click the button, Lasernet Developer attempts to use those credentials to obtain a new access token.

Important Upgrade Information

If you are upgrading from Lasernet Core 10, Lasernet Core 11.0, or Lasernet Core 11.1, and your configuration includes a OneDrive Input module using user authentication, you must update it to use application authentication instead.

Also, you must modify the module to identify the user whose OneDrive to connect to. In earlier versions of Lasernet Core, the module could connect to the OneDrive of the user that the module authenticated as. In Lasernet Core 11.2 and later, the module authenticates as an application; as a result, you must use the module’s User Principal Name property to identify the user.

Configure UPN, Drive, Path, and Scheduling and Provide Values for Other Module Properties

Refer to the information for the version of Lasernet Core that you are using.

Lasernet Core 11.0 and 11.1

To complete the configuration for this module, follow these steps:

  1. On the Setup tab of the OneDrive Properties window, set Drive and Path to specify the location to poll for incoming files. If Drive is not set, the module uses the specified user’s default OneDrive location. You can also use Scan mask (and its accompanying settings) to specify which files this module will process.

  2. On the Scheduling tab of the OneDrive Properties window, create a scheduling event with a specified polling interval to control this input.

Lasernet Core 11.2 and later

To complete the configuration for this module, follow these steps:

  1. Decide whether the module will connect to a specific user’s OneDrive or to another OneDrive location that the app registration has access to. Then, follow the relevant instructions:

    • User’s OneDrive: Enter an identity (as a Microsoft Entra ID email-style login identifier) as the User Principal Name (UPN). The UPN identifies the user whose OneDrive this module will connect to. If you enter a UPN, you do not select a drive.

    • Other OneDrive location: In the Drive box, click the (three dots) button to select from a list of other OneDrive drives that the app registration has access to.

  2. Use Path to specify the folder to poll for incoming files.

  3. Optional: Use Scan mask (and its accompanying settings) to specify which files this module will process.

  4. On the Scheduling tab of the OneDrive Properties window, create a scheduling event with a specified polling interval to control this input.

Notes

When this module downloads a file, it hard-deletes it from OneDrive.

This module creates a job for each file that it downloads.

JobInfos

The following JobInfos will be set for the incoming Job.

FileLastModified

When the file was last modified.

FileCreated

When the file was created.

FullFilename

Full path to the file including the filename.

Filepath

Location of the file.

Filename

Name of the file including its extension.

Extension

Extension of the file prefixed with a dot.

FilenameWithoutExt

Name of the file without the extension.

Filesize

Size of file in bytes.

Was this page helpful? Let us know at knowledgebase.feedback@lasernetgroup.com