Skip to main content

Microsoft Sharepoint Component

Interact with sites, drives, and items connected to your instance of Microsoft Sharepoint.

Component key: ms-sharepoint

Description#

Microsoft Sharepoint is a web-based collaborative platform that integrates with Microsoft Office. This component allows you to interact with your sites, drives, and items by making queries through the Microsoft Graph API.

Microsoft Sharepoint Connections#

Microsoft Sharepoint OAuth 2.0#

Once you have an instance of Microsoft Sharepoint licensed to your account, you will need to create and configure a new "App Registration" within your Azure Active Directory tenant. When creating the application you will be prompted to select the 'Supported account types'. Under this section, be sure to select 'Accounts in any organizational directory (Any Azure AD directory - Multitenant)'.

You will need to go to "Platforms" and add the "Web" platform. In that section you should add Prismatic's OAuth 2.0 callback URL - https://oauth2.prismatic.io/callback - as a Redirect URI.

Next, go to "Certificates & Secrets" for the app and add a new Client Secret. Note this value as you will need to supply it to the connection within Prismatic.

You will also need the Application (client) ID from the "Overview" page.

The last step of configuring the "App Registration" is assigning "App Permissions". Click "Add Permission", click on the square labeled "Sharepoint", and then "Delegated permissions". You should select all permissions that are required for your desired integration.

Now, configure the OAuth 2.0 connection in Prismatic. Add an MS Sharepoint OAuth 2.0 connection config variable:

  • Use the Application (client) ID value for the Client ID field.
  • Use the Client Secret for the same named field.
  • If you didn't select Multitenant when creating the Azure application, you will need to replace the Authorize URL and Token URL with ones specific to your tenant.

Save your integration and you should be able to authenticate a user through MS Sharepoint with OAuth 2.0.

InputDefaultNotes
Input
Authorize URL
string
/ Required
Default
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
Notes
Provide a tenant specific OAuth 2.0 authorize endpoint.
Input
Client ID
string
/ Required
Default
Notes
Client Id of your Azure application
Input
Client Secret
password
/ Required
Default
Notes
Client Secret generated under 'Certificates & Secrets' in your Azure application.
Input
Scopes
string
/ Required
Default
https://graph.microsoft.com/Sites.Manage.All offline_access
Notes
Space separated OAuth 2.0 permission scopes
Input
Token URL
string
/ Required
Default
https://login.microsoftonline.com/common/oauth2/v2.0/token
Notes
Provide a tenant specific OAuth 2.0 token endpoint.

Actions#

Create Item in Site List#

Create a new item inside the given site list | key: createItemInSite

InputNotesExample
Input
Connection
connection
/ Required
Notes
 
Example
 
Input
Fields
string
/ Required
Key Value List
Notes
For each item, provide a key value pair to be added to the new drive item's properties.
Example
 
Input
List Id
string
/ Required
Notes
Provide the unique identifier of a Sharepoint site list.
Example
48bf81d7-2d37-40a9-b47b-c1d1960d00f87
Input
Site Id
string
/ Required
Notes
Provide the unique identifier of a Sharepoint site.
Example
example.sharepoint.com,c45de8832-a4969-479d-aeb2-7nAh8321,48bf81d7-2d37-40a9-b47b-c1d1960d00f87

Download File#

Download a file from the current user's drive | key: downloadFile

InputNotesExample
Input
Connection
connection
/ Required
Notes
 
Example
 
Input
File Location
string
/ Required
Notes
Provide a leading slash followed by the location of your file within the current user's drive.
Example
/folder1/myExampleFile.csv

Get Drive#

Returns the information and metadata of a sharepoint drive | key: getDrive

InputNotesExample
Input
Connection
connection
/ Required
Notes
 
Example
 
Input
Drive
string
/ Required
Notes
Provide the unique identifier of a Sharepoint drive. This value can either be an Id or a name.
Example
Documents
Input
Site Id
string
/ Required
Notes
Provide the unique identifier of a Sharepoint site.
Example
example.sharepoint.com,c45de8832-a4969-479d-aeb2-7nAh8321,48bf81d7-2d37-40a9-b47b-c1d1960d00f87

Get Item from Site List#

Returns the information and metadata of the given item | key: getItemInSite

InputNotesExample
Input
Connection
connection
/ Required
Notes
 
Example
 
Input
Item Id
string
/ Required
Notes
Provide the unique identifier of a Sharepoint item Id.
Example
48bf81d7-2d37-40a9-b47b-c1d1960d00f87
Input
List Id
string
/ Required
Notes
Provide the unique identifier of a Sharepoint site list.
Example
48bf81d7-2d37-40a9-b47b-c1d1960d00f87
Input
Opt In Fields
string
Notes
Provide a comma separated list of fields to overwrite the default result set.
Example
name, description, id
Input
Site Id
string
/ Required
Notes
Provide the unique identifier of a Sharepoint site.
Example
example.sharepoint.com,c45de8832-a4969-479d-aeb2-7nAh8321,48bf81d7-2d37-40a9-b47b-c1d1960d00f87

Get Root Site#

Returns the information and metadata of the root Sharepoint site in your tenant | key: getRootSite

InputNotes
Input
Connection
connection
/ Required
Notes
 

Output Example Payload#

{  "data": {    "description": "Example description",    "id": "example.sharepoint.com,c45e332-a998-479d-aeb2-2a",    "name": "Example Sharepoint Site",    "webUrl": "https://example.sharepoint.com",    "displayName": "Communication Site",    "siteCollection": {      "hostname": "https://example.sharepoint.com"    }  }}

Get Site#

Returns the information and metadata of the given Sharepoint site | key: getSite

InputNotesExample
Input
Connection
connection
/ Required
Notes
 
Example
 
Input
Site Id
string
/ Required
Notes
Provide the unique identifier of a Sharepoint site.
Example
example.sharepoint.com,c45de8832-a4969-479d-aeb2-7nAh8321,48bf81d7-2d37-40a9-b47b-c1d1960d00f87

Output Example Payload#

{  "data": {    "description": "Example description",    "id": "example.sharepoint.com,c45e332-a998-479d-aeb2-2a",    "name": "Example Sharepoint Site",    "webUrl": "https://example.sharepoint.com",    "displayName": "Communication Site",    "siteCollection": {      "hostname": "https://example.sharepoint.com"    }  }}

Get Site List#

Returns the information and metadata of an existing site list | key: getList

InputNotesExample
Input
Connection
connection
/ Required
Notes
 
Example
 
Input
List Id
string
/ Required
Notes
Provide the unique identifier of a Sharepoint site list.
Example
48bf81d7-2d37-40a9-b47b-c1d1960d00f87
Input
Site Id
string
/ Required
Notes
Provide the unique identifier of a Sharepoint site.
Example
example.sharepoint.com,c45de8832-a4969-479d-aeb2-7nAh8321,48bf81d7-2d37-40a9-b47b-c1d1960d00f87

List Drives#

List all drives within any given sharepoint site | key: listDrives

InputNotesExample
Input
Connection
connection
/ Required
Notes
 
Example
 
Input
Page Limit
string
Notes
Enter a number amount for the page size.
Example
100
Input
Page Token
string
Notes
Enter the token for the desired page.
Example
X%2744537079ghv
Input
Site Id
string
/ Required
Notes
Provide the unique identifier of a Sharepoint site.
Example
example.sharepoint.com,c45de8832-a4969-479d-aeb2-7nAh8321,48bf81d7-2d37-40a9-b47b-c1d1960d00f87

Output Example Payload#

{  "data": {    "value": [      {        "description": "Example description",        "id": "b!MuNdxJajdskwMdeBv0g3LalAtHvB0ZYND4d",        "name": "Documents",        "webUrl": "https://example.sharepoint.com/Shared%20Documents",        "driveType": "documentLibrary"      }    ]  }}

List Items in Site List#

Return all items inside the given site list | key: getListItemsInSite

InputNotesExample
Input
Connection
connection
/ Required
Notes
 
Example
 
Input
List Id
string
/ Required
Notes
Provide the unique identifier of a Sharepoint site list.
Example
48bf81d7-2d37-40a9-b47b-c1d1960d00f87
Input
Opt In Fields
string
Notes
Provide a comma separated list of fields to overwrite the default result set.
Example
name, description, id
Input
Page Limit
string
Notes
Enter a number amount for the page size.
Example
100
Input
Page Token
string
Notes
Enter the token for the desired page.
Example
X%2744537079ghv
Input
Site Id
string
/ Required
Notes
Provide the unique identifier of a Sharepoint site.
Example
example.sharepoint.com,c45de8832-a4969-479d-aeb2-7nAh8321,48bf81d7-2d37-40a9-b47b-c1d1960d00f87

List Site Lists#

List all Site Lists | key: listSiteLists

InputNotesExample
Input
Connection
connection
/ Required
Notes
 
Example
 
Input
Site Id
string
/ Required
Notes
Provide the unique identifier of a Sharepoint site.
Example
example.sharepoint.com,c45de8832-a4969-479d-aeb2-7nAh8321,48bf81d7-2d37-40a9-b47b-c1d1960d00f87

List Sites#

List all sharepoint sites | key: listSites

InputNotesExample
Input
Connection
connection
/ Required
Notes
 
Example
 
Input
Page Limit
string
Notes
Enter a number amount for the page size.
Example
100
Input
Page Token
string
Notes
Enter the token for the desired page.
Example
X%2744537079ghv

Output Example Payload#

{  "data": {    "value": [      {        "description": "Example description",        "id": "example.sharepoint.com,c45e332-a998-479d-aeb2-2a",        "name": "Example Sharepoint Site",        "webUrl": "https://example.sharepoint.com",        "displayName": "Communication Site",        "siteCollection": {          "hostname": "https://example.sharepoint.com"        }      }    ]  }}

Move File#

Move the given file to a new location | key: moveFile

InputNotesExample
Input
Connection
connection
/ Required
Notes
 
Example
 
Input
Current Location
string
/ Required
Notes
Provide a leading slash, followed by the location and name of the file
Example
/myFile.txt
Input
New File Name
string
/ Required
Notes
Provide a string value for the name of the new file.
Example
myNewFile.txt
Input
New Location
string
/ Required
Notes
Provide a leading slash, followed by the new location of the file.
Example
reports.csv

Raw Request#

Issue a raw HTTP request with the configured connection | key: rawRequest

InputDefaultNotesExample
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Data
string
Default
Notes
The HTTP body payload to send to the URL. Must be a string or a reference to output from a previous step.
Example
{"exampleKey": "Example Data"}
Input
Debug Request
boolean
Default
false
Notes
Enabling this flag will log out the current request.
Example
 
Input
File Data
string
Key Value List
Default
Notes
File Data to be sent as a multipart form upload.
Example
[{key: "example.txt", value: "My File Contents"}]
Input
Form Data
string
Key Value List
Default
Notes
The Form Data to be sent as a multipart form upload.
Example
[{"key": "Example Key", "value": new Buffer("Hello World")}]
Input
Header
string
Key Value List
Default
Notes
A list of headers to send with the request.
Example
User-Agent: curl/7.64.1
Input
Max Retry Count
string
Default
0
Notes
The maximum number of retries to attempt.
Example
 
Input
Method
string
Default
Notes
 
Example
 
Input
Query Parameter
string
Key Value List
Default
Notes
A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.
Example
 
Input
Response Type
string
Default
json
Notes
The type of data you expect in the response. You can request json, text, or binary data.
Example
binary
Input
Retry Delay (ms)
string
Default
0
Notes
The delay in milliseconds between retries.
Example
 
Input
Retry On All Errors
boolean
Default
false
Notes
If true, retries on all erroneous responses regardless of type.
Example
 
Input
Timeout
string
Default
Notes
The maximum time that a client will await a response to its request
Example
2000
Input
URL
string
/ Required
Default
Notes
This is the URL to call.
Example
/sobjects/Account
Input
Use Exponential Backoff
boolean
Default
false
Notes
Specifies whether to use a pre-defined exponential backoff strategy for retries.
Example
 

Upload File#

Upload a file to the user's connected drive | key: uploadFile

InputNotesExample
Input
Connection
connection
/ Required
Notes
 
Example
 
Input
File Data
data
/ Required
Notes
Provide data to be uploaded to your desired sharepoint drive.
Example
These are my file contents.
Input
File Location
string
/ Required
Notes
Provide a leading slash, followed by the location and name of the new file.
Example
/folder1/myNewFile.csv