Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Pull files from sharepoint

nikhil69
New Contributor
New Contributor

Hey Folks,

We have an requirement to pull some csv files from an sharepoint site, what would be the best option for it?

Thanks.

3 REPLIES 3

rushikeshvartak
All-Star
All-Star

Using the SharePoint REST API

  • Description: You can use the SharePoint REST API to access files stored on SharePoint. By authenticating and querying the SharePoint site, you can pull CSV files directly.
  • How:
    • Authentication: Use OAuth or SharePoint App-Only authentication to connect securely.
    • API Call: Make a GET request to the SharePoint REST API endpoint for the specific file or folder.
    • Data Retrieval: Download the CSV file as a stream and process it within Saviynt.
  • Advantages: Secure, robust, and can be automated through Saviynt’s REST Connector.

2. Using Microsoft Graph API

  • Description: The Microsoft Graph API provides a unified endpoint to access SharePoint files and other Microsoft 365 services. This is particularly useful if you have other Microsoft 365 integrations.
  • How:
    • Authentication: Use OAuth with the appropriate permissions to access SharePoint files.
    • API Call: Use the Graph API to access the file and download it.
    • Data Handling: Once retrieved, process the CSV data as required within Saviynt.
  • Advantages: Unified API for Microsoft services, well-supported and documented.

3. Using Power Automate (Microsoft Flow)

  • Description: Power Automate allows you to automate the process of extracting CSV files from SharePoint and can integrate with Saviynt through various connectors.
  • How:
    • Flow Setup: Create a flow that triggers when a new file is added or updated in the SharePoint directory.
    • Action: The flow can send the file to an API endpoint in Saviynt or save it in a location accessible by Saviynt.
  • Advantages: No need to write custom code; it provides a visual interface for creating workflows.

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Thanks rushi, do you have any sample json for sharepoint rest api call?

Documentation References:

  1. SharePoint REST API Overview:

  2. Get File by Server Relative URL:

  3. OAuth Authentication for SharePoint:

    • Authentication details: Authenticate to SharePoint with OAuth
       

      Steps to Implement:

      1. Register an App in Azure AD: Create a client ID and secret for your SharePoint application.
      2. Grant API Permissions: Assign the required permissions to your app to access the SharePoint site.
      3. Retrieve OAuth Token: Use the client ID and secret to get an access token.
      4. Make the REST API Call: Use the token to authenticate and retrieve the desired file from SharePoint.

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.