Integrating Oracle Integration Cloud with Microsoft SharePoint

 

Integrating Oracle Integration Cloud with Microsoft SharePoint


About this blog

This blog is designed to provide detailed instructions on how to Integrate Oracle Integration Cloud (OIC) with Microsoft SharePoint. The steps provided in this blog is supported for OIC Gen2 and Gen3.

01

Introduction

Microsoft SharePoint excels as a centralized file storage solution, allowing organizations to securely upload, organize, and manage documents in a web-based environment. It offers features like version control, metadata management, and seamless integration with Microsoft Office for efficient collaboration and real-time editing. SharePoint's scalability and customization options make it an ideal choice for businesses looking to streamline their document management processes.

02

Why SharePoint?

Clients have traditionally utilized SFTP for managing data files. However, with evolving needs and preferences, there is a noticeable trend among clients to transition from SFTP to SharePoint. Several clients have already expressed this requirement.

SharePoint offers compelling advantages over traditional SFTP for data management:

  • Enhanced Security:SharePoint provides robust security features, including access controls, encryption, and compliance capabilities.
  • Improved Accessibility:Being web-based, SharePoint allows easier access to files from any location, facilitating collaboration and productivity.
  • Integration Capabilities:SharePoint seamlessly integrates with Microsoft Office and third-party applications, enhancing workflow efficiency.
03

Key Operations

  • Reading Files:Demonstrating how OIC can retrieve files from SharePoint.
  • Writing Files:Detailing the process of uploading files to SharePoint using OIC.
04

Steps to Integrate OIC with SharePoint

Steps to create a SharePoint REST connection

Oracle Integration Cloud offers the OAuth Custom Two-Legged security policy for accessing APIs secured through the OAuth framework. In OAuth 2.0, the client initiates by acquiring the access token through the OAuth API, which includes the access token itself, refresh token, expiration details, and more. This access token enables the client to interact with the designated resources to retrieve or transmit data.

We will leverage SharePoint APIs, which are OAuth 2.0 enabled, for our purposes.

In SharePoint

To establish the SharePoint REST connection, registration of a confidential App in SharePoint and certain details are required. It's important to emphasize that performing these actions and acquiring these details requires Administrator access.

Reference: https://o365reports.com/2023/09/13/how-to-register-an-app-in-sharepoint-online

NameExplanation
Client IDUnique identifier for an application registered in Azure Active Directory (AAD) that is used to authenticate and authorize against Azure AD. It identifies your application when it interacts with APIs, such as SharePoint APIs.
Client SecretCredential used by the application to authenticate itself to Azure AD. It is essentially a password for the application. When the application makes a request to Azure AD, it includes the client ID and client secret to prove its identity.
Tenant IDUnique identifier for your organization's Azure Active Directory tenant. It represents the organization in Azure AD. Every Azure AD directory has a tenant ID.
Application IDUnique ID of the Microsoft applications. In our case "Office 365 SharePoint Online".

In OIC

Create a connection in Oracle Integration Cloud as below:

01

Adapter Type: REST · Role: Trigger and invoke

02

Click on Configure Connectivity button, configure below and click on the Ok button.

Connection Type: REST API Based URL
TLS version: TLSv1.2
Connection URL: https://abcde.sharepoint.com

03

Select Security Policy under Security as "OAuth Custom Two Legged Flow"

04

Mention the Access Token Request URL:

Access Token Request
-X POST -H "Content-Type: application/x-www-form-urlencoded"
https://accounts.accesscontrol.windows.net/52396626-9694-4c25-b1ae-f526c756cc35/tokens/OAuth/2
?client_id=a4bfa0fe-8d7f-4b52-a79b-523d037b6f7c@52396626-9694-4c25-b1ae-f526c756cc35
&client_secret=IoZuH0XZyOsPN7SBLNKCnXXbiNndZkjN6nowE8csYSQ=
&resource=00000003-0000-0ff1-ce00-000000000000/abcde.sharepoint.com@52396626-9694-4c25-b1ae-f526c756cc35
&grant_type=client_credentials

Optional Security Configuration

Refresh Token Request: NA

$access_token: access_token

$expiry: expires_in

$token_type: token_type

access_token_usage: -H Authorization: ${token_type} ${access_token}

Configure Security Options Reference Table

Refer below table, while configuring the options (Configure Security) in ICS connection:

OptionDefault ValueValue to be Configured
$access_tokenaccess.[tT]okenThis will be the variable name which is coming in the API response which holds the value of access_token
$expiryexpires_inThis will be the variable name which is coming in the API response which holds the value of expires_in
$token_typetoken.?[tT]ypeThis will be the variable name which is coming in the API response which holds the value of token_type
access_token_usage-H Authorization: ${token_type} ${access_token}How the access token will be used to access the protected resource.

Sample SharePoint Access Token Response

JSON · Sample Response
{
  "token_type": "Bearer",
  "expires_in": "28800",
  "not_before": "1557734767",
  "expires_on": "1557763867",
  "resource": "00000003-0000-0ff1-ce00-000000000000/online.sharepoint.com@ewdvf432-hdsa-4f80-b3a0-d9e31f11fd33",
  "access_token": "esdssdsd221212sdMSDSD...<token value>"
}
Tip

Test the connection from the Upper right corner. If everything is OK, the connection should be successful.

05

Read File from SharePoint

We can read a file from the SharePoint site by using the connection in the Integration we created in our previous section. Please refer below for the API details:

GETRead File API
Type
REST
End Point
/sites/{site}/_api/web/GetFolderByServerRelativeUrl('{FolderName}')/Files('{FileName}')/$value
Method
GET
Sample Request
N/A
Response Format
Binary
Media Type
application/octet-stream
06

Write File to SharePoint

We can write a file from OIC to the SharePoint site by using the connection in the Integration we created in our previous section. Please refer below for the API details:

Note: Remove 'overwrite=true' if you do not want to overwrite an existing file with a similar name.

POSTWrite File API
Type
REST
End Point
/sites/{site}/_api/web/GetFolderByServerRelativeUrl('{FolderName}')/Files/add(url='{FileName}',overwrite=true)
Method
POST
Sample Request
N/A (File)
Request Format
Binary
Request Media Type
application/octet-stream
Response Format
JSON
Response Media Type
application/json;odata=verbose
07

Conclusion

The integration of Oracle Integration Cloud (OIC) with Microsoft SharePoint offers a powerful solution for organizations looking to enhance their data management processes. By leveraging SharePoint's robust security features, seamless integration with Microsoft Office, and superior accessibility, businesses can transition from traditional SFTP methods to a more scalable and secure platform. This blog has outlined the necessary steps to establish this integration, including setting up the SharePoint REST connection and configuring OIC for efficient file read and write operations.

As organizations continue to prioritize data security and streamlined workflows, the adoption of OIC with SharePoint stands out as a strategic move. We encourage to explore this integration to harness the potential of SharePoint infrastructure. With the detailed guidance provided in this document, you are well-equipped to implement this solution successfully and achieve your digital transformation goals.

Oracle Integration Cloud · Microsoft SharePoint Integration

Comments

Popular posts from this blog

Oracle Integration Cloud: Evolution, Features & the Future of Enterprise Integration

Oracle Integration Cloud FBDI and HDL Integrations with Encryption

Enhancing Enterprise Data Security with Oracle Cloud Infrastructure (OCI): A Comprehensive Approach