In this article we will explain how to setup a OneDrive Connector in your portal.


You can use the Google Drive connection to upload various datafiles for use in the portal, be it a datafile of your customers to send out invites or adding additional background information, such as information about the respondent, products and/or services they purchased, to the data already present in the database.


Table of contents:


General

CYS provides 7 different ways of importing data into your portal:


  • Via manual upload
  • Via SFTP
  • Via OneDrive
  • Via Google Drive
  • Via Dropbox
  • Via Box
  • Via an API connection


For each option you will find an explanation in our Knowledge Base. This article is about setting up the OneDrive Connection.


OneDrive

To add an import that automatically uploads data via OneDrive to your portal requires preparation in your OneDrive account. The steps below describe the necessary actions for the automated connection to be established.


Note: You will need to register your OneDrive application with Microsoft Azure Active Directory (Azure AD). Azure AD manages the automated connection between OneDrive and your CYS portal. 

In order to complete this procedure, you must have a thorough understanding of Microsoft Azure Active Directory. The Azure AD Application is subject to change without notice, which might impact the steps below. To consult Microsoft documentation on the latest updates, review "Azure Active Directory Documentation" such as https://docs.microsoft.com/en-us/azure/active-directory/)


  • Access the Azure portal (https://portal.azure.com/) using your global admin user account.
  • In the Azure dashboard, in the left navigation pane, click Azure Active Directory.
  • In the navigation pane, click App registrations
  • The "App registrations" page appears. Click on New registration
  • The "Register an application" screen appears.
  • In the Name box, type a name for the app.
  • Under Supported account types, select Accounts in any organizational directory and personal Microsoft accounts. 
  • Click Register.
  • Copy and paste the following values in a document that you can access later, because you will need to enter these values in the CYS portal when setting up the OneDrive import source:
  1. Tenant ID
  2. Application ID
  • On the preview screen, click API permissions.
  • Click Add a permission. The Request API permissions pane appears.
  • Click Microsoft Graph tile.
  • Click Application permissions, and then select the following permissions:
  1. Under Files, select the Files.ReadWrite.All check box. 
  2. Under User, select the User.Read.All check box.
  • Click Add permissions.
  • Click Grant permission to <app_name you have chosen>.
  • A confirmation dialog box appears. Click Yes.


A message states that admin consent is granted for the requested permissions.

  • On the preview screen, now click Certificates and secrets, and then complete the following steps:
  • Click New client secret.
  • Enter a description. From the Expires list, select the number of months after which the client secret will expire.
  • Click Add.
  • Record the client secret key value, as this is needed to setup your import source as well.


Once these preparations in your OneDrive account are done, you can setup the import source within your CYS portal.


Adding the import source to your portal

  • Open your portal and in the left-hand pane click DATA GARDEN (1) to open the dropdown list. 
  • Click Sources (2).
  • Click the Add New Source (3) button on the top right of your screen.



  • Select Connectors & Integration (4) and use the previous / next buttons to scroll through available options. 
  • When you come to the Automatically upload through OneDrive option, click the Add (5) button.



  • A pop-up will appear where you need to enter a name for your import source. After doing so, click Add.
  • The import source will be added to your portal.
  • Click the SOURCE (6) button of the import source you just added.



  • Click the Definitions (7) tab.
  • Here you can add the columns of your datafile. You can do this manually or by uploading a sample datafile. The file can be an Excel file or a CSV file. We recommend using a sample datafile to add the columns to your import.



For more information about Setting up an import, please read the Defining the columns article.



After adding the column definitions to your import source, four new tabs will be available to you; File Sources, Rules on Import, Data View and Log (8). Click the File Sources tab. To connect your import source to OneDrive, you need to provide the information from your OneDrive environment:


  • Tenant ID
  • Application ID
  • Application secret
  • Username
  • Folder path


Use the direct path of where the files are added. This can be the name of the shared folder, or a folder underneath. It should always be just the name of a single folder, not a full path.



Once a file is placed in the folder that matches your import rules, it will be automatically picked up and processed into your import slot. The filename will be edited to indicate that it is processed.