SharepointFiles

SharePoint Files Input Tool

Version:
2021.3
Last modified: August 13, 2021

Use the SharePoint Files Input tool to read the data from your CSV, XLSX and YXDB files on the SharePoint site. 

Tool Configuration

Following process applies to Microsoft SharePoint Online. To install the SharePoint Files Input tool, in Designer open the SharePoint Files yxi file you have downloaded from Gallery. 

To install the SharePoint Files Input tool for all users, open Designer as administrator.

  1. Drag and drop the SharePoint Files Input tool to your canvas. You can also use the Search field to find 'Sharepoint'.
  2. The OAuth method is used for an authentication.
    1. Sign in via Internet Browser - use the default Alteryx application. 
    2. Provide authentication details - use your own OAuth application. To authenticate, insert your user name and password. 
      To be able to schedule your workflow on Server when using the Cloud services, you need to enable Use as service principal (app-only authentication) so that your token has an extended expiration.
      When using the SharePoint Files Input tool for the first time, you must give the app your consent to use the listed permissions.
      See the Custom API Application Setup section for the information on how to create your own API application.   

      Depending on your company policy, some permissions might require administrator approval. In such case fill in your reason in the app and send request and/or contact your IT directly.

       

  3. You can now choose Site and Document Library. To select your file, you can then browse through the folders (you can also use Search to find your Site, Library, and File). Note that File Path for the selected file is modified according to the selection made. 

    Tip

    To File Path you can also insert (pressing 'Ctrl+V' and 'Enter') the path of your file by using the Copy Link button on the SharePoint site.

     

  4. In the Options tab, you can check File FormatMax Field LenghtField Delimiter (Comma by default). Also, you can Quote Characters (None by default), Attach Metadata, and check page coding

    For unsupported file format (other than CSV, XLSX and YXDB) you will get an error message.

     

  5. The tree view is populated according to the site selected. Based on the selected file format there is multiple options present in the Options tab.
  6. For the XLSX file format, in the Data tab you can select Data range options: All Sheets, Sheet NamesSheet Numbers along with a particular range, Named Range, or to Import only the list of sheet names.

    TIP

    You can choose also a folder with all subfolders (a file format is set manually), or you can define the file path using a wildcards. For example “.../*2020.xlsx” for all .xlsx files ending with '2020'.

  7. Select Run to execute the workflow.

Custom API Application Setup  

The SharePoint connector comes with built-in multi-tenant app you can use, but if you prefer using your own one, follow the steps below.   

For more information on how to build and manage an application using the Microsoft Azure cloud services, refer to the Azure documentation (https://docs.microsoft.com/en-us/azure/?product=featured). 

  1. Navigate to  https://portal.azure.com/#home

  2. Sign in with your Microsoft Azure Active Directory account.  

  3. On the Home screen use Search, or go to the upper left corner menu to open the Azure Active Directory service. 

  4. Open App registrations in the left menu. 

  5. Select + New registration.

  6. Specify the Name of the app.  

  7. Choose desired account type – both Single tenant and Multitenant are allowed.  

  8. In the Redirect URI (optional) part

    1. Select Single-page application (SPA) from the dropdown menu. 

    2. Set the URL to https://login.live.com/oauth20_desktop.srf

  9. Select Register.   
    The Application (client) ID is your Client ID
    The Directory (tenant) ID is your Tenant ID

  10. Go to API permissions to add these Delegated permissions - Microsoft Graph

    1. Files.ReadWrite.All

    2. offline_access

    3. openid

    4. User.Read

  11. To use service principal (app-only authentication) proceed to Certificates & secrets and add New client secret. Copy the Value as it won't be accessible again once you leave the page – this is your Secret ID
    In API permissions add these Application permissions - Microsoft Graph

    1. Files.Read.All

    2. Files.ReadWrite.All

    3. Sites.Read.All

Was This Page Helpful?

Running into problems or issues with your Alteryx product? Visit the Alteryx Community or contact support. Can't submit this form? Email us.