Move files from a drive or sftp site to UConn SharePoint

From Microsoft: The Microsoft Graph API offers a single endpoint, https://graph.microsoft.com, to provide access to rich, people-centric data and insights in the Microsoft cloud, including Microsoft 365, Windows, and Enterprise Mobility + Security

Microsoft Graph API can be used for many integrations with Microsoft products used at UConn, such as Outlook Mail and Calendar, OneNote, OneDrive, SharePoint, and more. Several business areas at UConn asked about migrating files off of drives and into SharePoint using Boomi. In this example, copies all the files in a specified directory on an sftp site to a target folder on a SharePoint site.

  1. You must first set up Microsoft Entra to ensure the user account has the permissions needed to use the particular Microsoft Graph API. For this example, a service account named its.boomi.sp.svc was created and configured with the proper permissions to upload files to a particular SharePoint site.

Please reach out to the Accounts & Access team via a NetID Help Support Ticket to request a service account for this purpose if you do not already have one.

  1. Next you need to identify the SharePoint destination. Browse SharePoint and identify the target site. Then right click on the name and copy the URL: https://uconn.sharepoint.com/_layouts/15/sharepoint.aspx?

  1. Navigate to Microsoft Graph Explorer. To confirm proper permissions, make sure to be logged in with the service account Boomi will use to transfer files. Call the sites search API, and enter the Display Name of the target site: https://graph.microsoft.com/v1.0/sites?search={Display Name}

  1. This will return an id in the location of the blue box below:

  1. Copy that Site ID and use it to call the Drives API to obtain a Drive ID (Document Library ID): https://graph.microsoft.com/v1.0/sites/{siteId}/drives?$select=id,name

  2. In the response, locate the record with the name corresponding to the target SharePoint Document Library (e.g., the name=”Documents”). Get the id, indicated by the green box in the example below.

This article is intended for individuals who have a Boomi Associate Integration Developer Certification. If you do not know how to complete an action like “add a message shape,” please complete the recommended trainings.

 Instructions

The complete Boomi process to get files in an sftp directory and move to a SharePoint site is shown here:

  1. Configure the Start shape as No Data since we need to set some properties before using a connector.

  2. Connect a Set Properties shape. Add a SFTP V2 - Remote Directory property and set to the source path. In this case, the static value of ‘/data/testing’ and add a Dynamic Document Property named thisWildcard and set it to the static value of '*'.

  3. Add an SFTP V2 connector that connects to the source system and lists the files in the specified Remote Directory.

  4. On the Parameters tab, add the fileName:WILDCARD parameter and set the value to thisWildcard Property.

  5. Connect a Set Properties shape to the SFTP v2 list shape. Define a Dynamic Document Property, RESOURCE_PATH as the static value from your Graph API exploring: ‘v1.0/drives/{driveID}/root:/{directoryName}/’ + the fileName object from the sftp list json + ‘:/content’
    Also, define a Dynamic Document Property, thisFilename and set it to the fileName object from the sftp list json.

  6. Add an SFTP V2 connector that connects to the source system and GETS the files in the specified Remote Directory.

  7. Set the ID Parameter to the Dynamic Document Property, thisFilename.

  8. Add an Http Client connector.

  9. The connection will look something similar to the connection shown here but with a Client ID and Client Secret associated with your service account.

  10. Set the action to Send

  11. Configure a PUT operation by setting the Request Header accept value to ‘*/*’

  12. Set the resource path to the value ‘RESOURCE_PATH’ and check Is replacement variable?

  13. Set the Response Profile to a JSON profile that you defined that Matches the format of the PUT response of the SharePoint put.

     

 

How to Test

  1. Click Test in the upper right corner of the process pallet.

  2. Pick the Test Atom Cloud (TAC) available in your subaccount and click OK. An example shown here is the generic Test-Atom-Cloud for the mail UConn account.

  3. The process will execute in test mode, and you will see each step get a green halo as it completes successfully. You will see a success message when it is done.

  4. Confirm that the files that were located in the sftp or drive are now present on the specified SharePoint drive.

  5. Test complete.