In today’s cloud landscape, enterprises depend on SAS Viya for powerful analytics and Microsoft SharePoint for secure content management and team collaboration. However, moving files between these platforms has traditionally been a painful, manual process. This article introduces a no-code/low-code solution using custom steps in SAS Studio that automates file uploads, downloads, listings, and content management by eliminating manual intervention and reducing errors.
You can remove the friction of manual file transfers by seamlessly integrating SAS Viya with Microsoft SharePoint site through powerful, user-friendly custom steps in SAS Studio.
You can download the full toolkit of SAS Viya custom steps featured in this article from the attachments.
Analytics teams frequently struggle with the same repetitive and inefficient tasks when working across platforms:
For years, teams had only two but limited options:
These challenges result in manual bottlenecks, weakened governance, technical barriers, and persistent silos between analytics and business teams.
We developed a set of secure, standardized, reusable custom steps for SAS Studio that wrap Microsoft Graph API complexity into simple point-and-click interfaces.
Key Benefits:
The integration uses the Microsoft Graph API with OAuth 2.0 authentication.
The process involves three main phases:
The integration follows a simple and secure step-by-step process:
Before you can connect SAS Viya to SharePoint, you need to register a client application in Microsoft Azure portal. This is a one-time activity typically performed by your organization’s IT or DevOps team.
Steps to Register:
SharePoint config file template:
{
"tenant_id": "your-tenant-id-here",
"client_id": "your-client-id-here",
"redirect_uri": "https://login.microsoftonline.com/common/oauth2/nativeclient",
"resource": "https://graph.microsoft.com"
}
This step submits a POST request to the Microsoft identity platform to retrieve a short-lived OAuth 2.0 bearer token.
Key Features:
Authorization URL:
https://login.microsoftonline.com/{tenant_id}/oauth2/authorize?client_id={client_id}
&response_type=code&redirect_uri={redirect_uri}&resource={resource}
Required Inputs (from config file):
Note: Access tokens expire in approximately 60 minutes. Use the Refresh custom step to refresh access token.
PS- Client secrets are intentionally excluded; token-based authentication is enforced for tighter security.
This custom step automatically renews an expiring access token using a valid refresh token.
Required Inputs:
This ensures uninterrupted execution in scheduled or long-running flows.
|
Action: Import |
Action: Export |
|
|
The core step that performs actual file operations using the active bearer token.
Import Action (SharePoint site → SAS Viya)
Required Parameters:
Export Action (SAS Viya → SharePoint site)
Required Parameters:
Setting Up the Environment:
Typical Pipeline: Generate Access Token → Refresh Access Token → SharePoint Import → Analytics → SharePoint Export
You can schedule the entire flow using SAS Viya Jobs or Apache Airflow for fully automated data pipelines.
This solution effectively bridges the gap between powerful analytics platforms and enterprise collaboration tools. By bringing no-code integration capabilities directly into SAS Studio, we empower both technical and business users to focus on insights rather than file management.
The complete toolkit (includes all three custom steps) is attached with this article and available for download.
Files included:
Source: The code implemented within these presented custom steps is derived from, and inspired by, this referenced article. https://blogs.sas.com/content/sasdummy/2026/02/02/sas-programming-office-365-onedrive/
Using SAS with Microsoft 365 (OneDrive, Teams, and SharePoint)
For any questions, please don't hesitate to contact me on LinkedIn.
Visit the Tips & Tricks page for setup guidance, demos, and practical examples that show how Copilot supports your workflows.
The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.