Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Uzair30
Explorer
9,034

Our customer had a requirement  to combine data from SharePoint files with other data in an SAP Analytics Cloud (SAC) dashboard.  Since there is no native SharePoint connector for SAP Datasphere, we created a connection using SAP BTP’s open connector, which we then utilize from Datasphere. 

Here are the steps:

  1. Register an app for SharePoint API Access in Azure Active Directory
  2. Configure the registered application’s SharePoint API permissions
  3. Generate certificates and secrets for your registered app
  4. Create a SharePoint Open Connector instance in SAP BTP Integration Suite
  5. Establish a connection to your SharePoint Open Connector in Datasphere
  6. In Datasphere, create a dataflow to read your SharePoint directory
  7. In SAC create your story using your SharePoint-based model in Datasphere

 

1.    Register an app for SharePoint API Access in Azure Active Directory

  • Logon to your Azure Portal using your SharePoint online credentials
  • Navigate to Azure Active Directory and select App Registrations
  • Click New Registration to create an OAuth application

Uzair30_0-1729667040052.png

 

  • In the application registration prompt, enter an application name e.g. SharePointOAuthApp
  • Select the supported account types

Enter the redirect URL for SAP Cloud Platform Open Connectors:  https://auth.cloudelements.io/oauth 

Uzair30_1-1729667040058.png

 

2.    Configure the registered application’s SharePoint API permissions

 The registered application by default has only User.Read permission from Microsoft Graph APIs, so you need to add in permission to access SharePoint REST APIs.

  • Select API permissions tab and then click on Add a permission to add permissions for SharePoint REST APIs

Uzair30_2-1729667040065.png

  • Select SharePoint to add in the API permissions for SharePoint

Uzair30_3-1729667040069.png

 

 
 In SAP Cloud Platform Open Connectors, access to the API is via the signed-in user.

  • Select Delegated Permissions for accessing APIs as signed-in user 

Uzair30_4-1729667040070.png

 

  •  Select permissions shown below, then click Add permissions 

 

Uzair30_5-1729667040073.png

 

 
 Some of the selected permissions require administrator consent 

  • After the permission is selected, click on Grant admin access

 The permission may take some time to updated as shown in the warning, so wait for few minutes before selecting the Grant admin consent option. 

Uzair30_6-1729667040077.png

 

  • Select Yes if you are prompted to confirm the administrator consent 

Uzair30_7-1729667040078.png

 

  When successful, the status will change to Granted for your user. 

Uzair30_8-1729667040082.png

 

3.    Generate certificates and secrets for your registered app

For connecting to your SharePoint Online account from SAP Cloud Platform Open Connectors, an OAuth secret and client ID are required.

  • Select Certificates & secrets tab, click on New client secret

Uzair30_9-1729667040086.png

 

  • Enter a description for your OAuth secret and add

Uzair30_10-1729667040087.png

 



  • Note! Copy and save the generated client secret.  You need to provide the secret in order to create the SharePoint connector instance from SAP Open Connectors, and it cannot be retrieved later.

Uzair30_11-1729667040089.png

 

  • To get your OAuth Client ID , select Overview tab, copy the Application (client) ID value. 

Uzair30_12-1729667040093.png

 

4.    Create a SharePoint Open Connector instance in SAP BTP Integration Suite

  • In the SAP BTP navigate to Integration Suite
  • Select Extend Non-SAP Connectivity.If this option is not visible, click Manage Capabilities and enable Open Connectors capability.
     

Uzair30_13-1729667040098.png

 

  •   Select the Connectors tab
  • Hover over the SharePoint connector and select  Authenticate to connect to your own SharePoint account. 

Uzair30_14-1729667040109.png

 

  • In the connection wizard, enter a name for your connector instance
  • Enter your SharePoint Site Address in the format {your_sharepoint_domain}.sharepoint.com
  • In API Key enter your copied OAuth Client ID
  • In the API Secret dialog enter your copied OAuth secret
  • Select Show Optional Fields. 

Uzair30_15-1729667040114.png

 

  • Enable graph authentication to prompt user authentication (this corresponds with the delegated scoped defined on Azure)
  • Select Create Instance

You may be prompted to enter your SharePoint user credentials if  you are not already logged into your SharePoint account  
 

  • Trust your app
    Uzair30_16-1729667040116.png

After successfully creating your authenticated connection to your SharePoint account, you can test it

  • Choose Test in the API docs

 

Uzair30_17-1729667040118.png



  • Select GET /files to read files from your SharePoint sites

Uzair30_18-1729667040133.png

 

Uzair30_19-1729667040134.png

 

  • Click on Try it Out 

Uzair30_24-1729667638994.png

 

 

  • Insert the file path for a valid file in the folder (no sub folders) and choose execute

  (Note:- If your site contains spaces, then in the Subsite field enter the site name without spaces.) 

Once the test has run successfully, the updated file should be available for download.

 

5.    Establish a connection to your SharePoint Open Connector in Datasphere 

  • Enter your SAP BTP Subaccount Region  

The BTP region can be found within the Account Explorer page in the BTP Cockpit  

Uzair30_21-1729667040145.png

 

  • Enter your Organization Secret 
  • Enter your User Secret 

Uzair30_22-1729667040147.png

 

 

 

For the Organizational and User secrets, after creating the instance to the app you need, make any type of API request, for example "GET" 

Uzair30_23-1729667040151.png

 

 

The authorization String will contain the necessary detail as well. 

6.    In Datasphere, create a dataflow to read your SharePoint directory

  • Create a dataflow to read your SharePoint directory and post the data into a local table
  • Create a fact view to transform your data as required
  • Create an analytical model for external consumption

7.    In SAC create your story using your SharePoint-based Datasphere model

10 Comments