Skip to main content

Import data from MS SharePoint

Learn how to import products from Microsoft SharePoint into the Productsup platform.

Introduction

Microsoft SharePoint is a cloud-based platform for data storage, collaboration, and file management.

To import products from your MS SharePoint account to Productsup, you need to add and set up the data source Microsoft SharePoint in Data Sources. This integration lets you import .csv and .xslx files from MS Sharepoint.

Note

You may need some technical expertise to set up the Microsoft SharePoint data source.

Prerequisites

To use Microsoft SharePoint as a data source in Productsup, you need to follow the steps:

Step 1: Create app registration and save account data for the further data source setup.

  1. Go to Microsoft Azure portal.

  2. Go to the Azure active directory Entra ID.

  3. Go to App registrations and create a new registration by taking all the steps in the wizard.

    Tip

    Name your registration Productsup-sharepoint-connector and decide on the supported accounts. A single-tenant should be enough, but this depends on your organisation.

  4. When you created the application, save separately the following details that you will need for the data source setup:

    • Application (client) id for Client Id

    • Directory (tenant) id for Tenant Id.

  5. Go to API permissions from the menu to set the permissions:

    • User.Read

    • Sites.Selected.

  6. Switch on the Grant admin consent for [Company].

  7. Go to Certificates & secrets from the menu and generate a new client secret. Give it a description and set expiry date. Save it as your Client secret for further data source setup.

Step 2: Give an application access to the specific sites.

To give an enterprise application or app registration access to a specific site or multiple sites, execute the SharePoint PnP PowerShell script provided below. A CSV file should contain the following:

  • A list of MS SharePoint site URLs

  • Your admin account User Principal Name

  • The app ID or AppDisplayName.

Note

You need the Administrator rights of your MS SharePoint account to execute the script.

# Connecting to the <Company name> SPO Service and importing the SPO PNP Module
Connect-SPOService -URL <InsertTenantSPAdminURL>
Import-Module PnP.PowerShell

##########################################################################################################################
#                                                                                                                        #
# The following part give the respective Enterprise Application their neccessary rights.                                 #
# It does so by using the .csv file from the previous part as input for sites to give the respective rights for.         #
#                                                                                                                        #
##########################################################################################################################

$SPSitelist = <InsertPathToCSVContainingListOfSPSites>
$ADMAccount = <InsertUsedADMAccount>

$AppID = <InsertAppID>
$Displayname = <InsertAppDisplayname>
foreach ($SPSite in $SPSitelist)
{
    write-output $SPSite
    Set-SPOUser -site $SPSite -LoginName $ADMAccount -IsSiteCollectionAdmin $True -Verbose
    Connect-PnPOnline $SPSite -Interactive
    Grant-PnPAzureADAppSitePermission -AppId $AppID -DisplayName $Displayname -Site $SPSite -Permissions Write -Verbose
    Set-SPOUser -site $SPSite -LoginName $ADMAccount -IsSiteCollectionAdmin $False -Verbose
}

Tip

You can also toggle between Write and Read permission by changing the respective permissions parameter in the foreach loop.

Add the data source Microsoft SharePoint

  1. Go to Data Sources from your site's main menu and select ADD DATA SOURCE.

  2. Search for Microsoft SharePoint, select Add, give it a name as desired, and then select Continue.

    Microsoft SharePoint
  3. Enter your Microsoft SharePoint data from the Prerequisites into the following fields:

    • In Client ID, enter your MS SharePoint client ID.

    • In Client secret, enter our MS SharePoint client secret.

    • In Tenant ID, enter your MS SharePoint tenant ID.

    • In File Share Link, enter the link to the file you want to share.

    • In File Type, select the type of the shared file: cvs or xlsx.

      Note

      Check if the access to the file in MS SharePoint isn't restricted.

    MS SharePoint set up
  4. In Description (optional), add a description for your data source. It substitutes the data source name on the Overview Data Sources page.

  5. Select Save.

  6. To import data from MS SharePoint, select Import in the top-right corner of your site's view.