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
authorizeUrl
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
clientId
Default
Notes
Client Id of your Azure application
Input
Client Secret
password
/ Required
clientSecret
Default
Notes
Client Secret generated under 'Certificates & Secrets' in your Azure application.
Input
Scopes
string
/ Required
scopes
Default
Sites.ReadWrite.All Sites.Manage.All offline_access
Notes
Space separated OAuth 2.0 permission scopes
Input
Token URL
string
/ Required
tokenUrl
Default
https://login.microsoftonline.com/common/oauth2/v2.0/token
Notes
Provide a tenant specific OAuth 2.0 token endpoint.

Triggers#

Webhook#

Trigger for handling webhooks from SharePoint | key: webhook


Actions#

Create Item in Site List#

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

InputNotesExample
Input
Connection
connection
/ Required
connection
Notes
 
Example
 
Input
Fields
string
/ Required
Key Value List
fields
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
listId
Notes
Provide the unique identifier of a SharePoint site list.
Example
48bf81d7-2d37-40a9-b47b-c1d1960d00f87
Input
Site Id
string
/ Required
siteId
Notes
Provide the unique identifier of a SharePoint site.
Example
example.sharepoint.com,c45de8832-a4969-479d-aeb2-7nAh8321,48bf81d7-2d37-40a9-b47b-c1d1960d00f87

Create Site List Subscription#

Create a Site List subscription for Microsoft SharePoint | key: createSiteListSubscription

InputDefaultNotesExample
Input
Allow Duplicates
boolean
allowDuplicates
Default
false
Notes
Enable to allow more than one webhook per endpoint
Example
 
Input
Connection
connection
/ Required
connection
Default
 
Notes
 
Example
 
Input
Expiration Date/Time
string
expirationDateTime
Default
Notes
Expiration date/time for subscription. If unspecified the default will be the current date/time plus 29 days (close to the maximum permitted by the Graph API).
Example
 
Input
List Id
string
/ Required
listId
Default
Notes
Provide the unique identifier of a SharePoint site list.
Example
48bf81d7-2d37-40a9-b47b-c1d1960d00f87
Input
Notification URL
string
/ Required
notificationUrl
Default
Notes
URL to send events of this Subscription to
Example
 
Input
Site Id
string
/ Required
siteId
Default
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": {    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#subscriptions/$entity",    "id": "e9d5b726-4478-4412-bfba-268530484566",    "resource": "sites/example.sharepoint.com,17cd4ada-1a76-420e-a7ec-4adaa3327c86,87742bc7-2d2f-404c-8255-d3d9fa9a6561/lists/3a3c0f6a-86da-4567-94d4-3b939da63200",    "applicationId": "e76615c0-13e3-4cd2-8235-a2d628ad13de",    "changeType": "updated",    "clientState": null,    "notificationUrl": "https://example.com/webhook/",    "notificationQueryOptions": null,    "lifecycleNotificationUrl": null,    "expirationDateTime": "2022-11-22T23:32:10.231Z",    "creatorId": "c8edbeda-c453-446c-91ce-c6d5c7310a6c",    "includeResourceData": null,    "latestSupportedTlsVersion": "v1_2",    "encryptionCertificate": null,    "encryptionCertificateId": null,    "notificationUrlAppId": null  }}

Delete All Instance Subscriptions#

Delete all subscriptions pointed at this instance | key: deleteAllInstanceSubscriptions

InputNotes
Input
Connection
connection
/ Required
connection
Notes
 

Output Example Payload#

{  "data": {    "subscriptionsRemoved": [      "26ebd1e9-c54a-4bbe-9583-fc05974952a4",      "b9b27172-ee2e-4248-86df-fc98cb71d914"    ]  }}

Delete Subscription#

Delete existing subscription for Microsoft SharePoint | key: deleteSubscription

InputNotes
Input
Connection
connection
/ Required
connection
Notes
 
Input
Subscription ID
string
/ Required
subscriptionId
Notes
Subscription ID to manage

Output Example Payload#

{  "data": ""}

Download File#

Download a file from the specified drive | key: downloadFile

InputNotesExample
Input
Connection
connection
/ Required
connection
Notes
 
Example
 
Input
Drive
string
/ Required
driveId
Notes
Provide the unique identifier of a SharePoint drive.
Example
b!WumF-zsD8ku93Y0QqhKM9jVTjPefo6RGrpVCkPpe547Qrf38sox_TYIFuj9sqJhv
Input
Item Id
string
/ Required
itemId
Notes
Provide the unique identifier of a SharePoint item Id.
Example
01Q7VXROAW7LCB32ODBRCKZNSJIC544XAQ

Get Current User#

Get the information and metadata of the user that is currently logged in | key: getCurrentUser

InputNotes
Input
Connection
connection
/ Required
connection
Notes
 

Output Example Payload#

{  "data": {    "businessPhones": [      "+1 555 555 5555"    ],    "displayName": "exampleUser",    "givenName": "exampleUser",    "jobTitle": "Retail Manager",    "mail": "someoneV@example.onmicrosoft.com",    "mobilePhone": "+1 555 555 5555",    "officeLocation": "example",    "preferredLanguage": "en-US",    "surname": "Example",    "id": "3693-4789-a1c3-f4de565f"  }}

Get Drive#

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

InputNotesExample
Input
Connection
connection
/ Required
connection
Notes
 
Example
 
Input
Drive
string
/ Required
driveId
Notes
Provide the unique identifier of a SharePoint drive.
Example
b!WumF-zsD8ku93Y0QqhKM9jVTjPefo6RGrpVCkPpe547Qrf38sox_TYIFuj9sqJhv

Get File#

Get a file from a Drive | key: getFile

InputNotesExample
Input
Connection
connection
/ Required
connection
Notes
 
Example
 
Input
Drive
string
/ Required
driveId
Notes
Provide the unique identifier of a SharePoint drive.
Example
b!WumF-zsD8ku93Y0QqhKM9jVTjPefo6RGrpVCkPpe547Qrf38sox_TYIFuj9sqJhv
Input
Item Id
string
/ Required
itemId
Notes
Provide the unique identifier of a SharePoint item Id.
Example
01Q7VXROAW7LCB32ODBRCKZNSJIC544XAQ

Get Item from Site List#

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

InputNotesExample
Input
Connection
connection
/ Required
connection
Notes
 
Example
 
Input
Item Id
string
/ Required
itemId
Notes
Provide the unique identifier of a SharePoint item Id.
Example
01Q7VXROAW7LCB32ODBRCKZNSJIC544XAQ
Input
List Id
string
/ Required
listId
Notes
Provide the unique identifier of a SharePoint site list.
Example
48bf81d7-2d37-40a9-b47b-c1d1960d00f87
Input
Opt In Fields
string
optInFields
Notes
Provide a comma separated list of fields to overwrite the default result set.
Example
name, description, id
Input
Site Id
string
/ Required
siteId
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
connection
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
connection
Notes
 
Example
 
Input
Site Id
string
/ Required
siteId
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
connection
Notes
 
Example
 
Input
List Id
string
/ Required
listId
Notes
Provide the unique identifier of a SharePoint site list.
Example
48bf81d7-2d37-40a9-b47b-c1d1960d00f87
Input
Site Id
string
/ Required
siteId
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
connection
Notes
 
Example
 
Input
Page Limit
string
pageLimit
Notes
Enter a number amount for the page size.
Example
100
Input
Page Token
string
pageToken
Notes
Enter the token for the desired page.
Example
X%2744537079ghv
Input
Site Id
string
/ Required
siteId
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": {    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#drives",    "value": [      {        "createdDateTime": "2023-05-14T05:14:52Z",        "description": "",        "id": "b!o2UaIfdNxk-5091VjGz1sDVso2efo6RGrpVCkPpe547Qrf38sox_TYIFuj9QrJhv",        "lastModifiedDateTime": "2023-05-14T05:14:52Z",        "name": "Documents",        "webUrl": "https://example.sharepoint.com/Shared%20Documents",        "driveType": "documentLibrary",        "createdBy": {          "user": {            "displayName": "System Account"          }        },        "owner": {          "group": {            "id": "9705118a-6ce1-4fa3-adba-09f94b69d568",            "displayName": "9705118a-6ce1-4fa3-acda-09f94b69d446"          }        },        "quota": {          "deleted": 0,          "remaining": 27487789251101,          "state": "normal",          "total": 27487790694400,          "used": 1443299        }      }    ]  }}

List Files in Drive#

List all the files from a Drive | key: getFilesFromDrive

InputNotesExample
Input
Connection
connection
/ Required
connection
Notes
 
Example
 
Input
Drive
string
/ Required
driveId
Notes
Provide the unique identifier of a SharePoint drive.
Example
b!WumF-zsD8ku93Y0QqhKM9jVTjPefo6RGrpVCkPpe547Qrf38sox_TYIFuj9sqJhv

List Folder Files in Drive#

List all the files inside of a folder from a Drive | key: getFilesFromDriveFolder

InputNotesExample
Input
Connection
connection
/ Required
connection
Notes
 
Example
 
Input
Drive
string
/ Required
driveId
Notes
Provide the unique identifier of a SharePoint drive.
Example
b!WumF-zsD8ku93Y0QqhKM9jVTjPefo6RGrpVCkPpe547Qrf38sox_TYIFuj9sqJhv
Input
Folder ID
string
folderId
Notes
Provide the unique identifier of a Sharepoint folder Id.
Example
01Q7VXAXZW7LCB32ODBRCKZNSJIC544FXU

List Followed Sites#

List all Followed Sites | key: listFollowedSites

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

Output Example Payload#

{  "data": {    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites",    "value": [      {        "displayName": "Example",        "id": "example.sharepoint.com,6c44888f-5883-4ef0-c542-d21a802cfea6,ed2d5d06-e192-4047-afa6-a5d7f25b3418",        "sharepointIds": {          "siteId": "6c44888f-5883-4ef0-c542-d21a802cfea6",          "webId": "ed2d5d06-e192-4047-afa6-a5d7f25b3418"        },        "siteCollection": {          "hostname": "example.sharepoint.com"        },        "webUrl": "https://example.sharepoint.com/sites/Example"      }    ]  }}

List Items in Site List#

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

InputNotesExample
Input
Connection
connection
/ Required
connection
Notes
 
Example
 
Input
List Id
string
/ Required
listId
Notes
Provide the unique identifier of a SharePoint site list.
Example
48bf81d7-2d37-40a9-b47b-c1d1960d00f87
Input
Opt In Fields
string
optInFields
Notes
Provide a comma separated list of fields to overwrite the default result set.
Example
name, description, id
Input
Page Limit
string
pageLimit
Notes
Enter a number amount for the page size.
Example
100
Input
Page Token
string
pageToken
Notes
Enter the token for the desired page.
Example
X%2744537079ghv
Input
Site Id
string
/ Required
siteId
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
connection
Notes
 
Example
 
Input
Site Id
string
/ Required
siteId
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
connection
Notes
 
Example
 
Input
Page Limit
string
pageLimit
Notes
Enter a number amount for the page size.
Example
100
Input
Page Token
string
pageToken
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"        }      }    ]  }}

List Subscriptions#

List all subscriptions for Microsoft SharePoint | key: listSubscriptions

InputDefaultNotes
Input
Connection
connection
/ Required
connection
Default
 
Notes
 
Input
Show Instance Webhooks
boolean
/ Required
showInstanceWebhooks
Default
true
Notes
Show only subscriptions for this Instance's webhooks

Output Example Payload#

{  "data": {    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#subscriptions",    "value": [      {        "id": "e9d5b726-4478-4412-bfba-268530484566",        "resource": "sites/example.sharepoint.com,17cd4ada-1a76-420e-a7ec-4adaa3327c86,87742bc7-2d2f-404c-8255-d3d9fa9a6561/lists/3a3c0f6a-86da-4567-94d4-3b939da63200",        "applicationId": "e76615c0-13e3-4cd2-8235-a2d628ad13de",        "changeType": "updated",        "clientState": null,        "notificationUrl": "https://example.com/webhook/",        "notificationQueryOptions": null,        "lifecycleNotificationUrl": null,        "expirationDateTime": "2022-11-22T23:32:10.231Z",        "creatorId": "c8edbeda-c453-446c-91ce-c6d5c7310a6c",        "includeResourceData": null,        "latestSupportedTlsVersion": "v1_2",        "encryptionCertificate": null,        "encryptionCertificateId": null,        "notificationUrlAppId": null      }    ]  }}

Raw Request#

Issue a raw HTTP request | key: rawRequest

InputDefaultNotesExample
Input
Connection
connection
/ Required
connection
Default
 
Notes
 
Example
 
Input
Data
string
data
Default
Notes
The HTTP body payload to send to the URL.
Example
{"exampleKey": "Example Data"}
Input
Debug Request
boolean
debugRequest
Default
false
Notes
Enabling this flag will log out the current request.
Example
 
Input
File Data
string
Key Value List
fileData
Default
Notes
File Data to be sent as a multipart form upload.
Example
[{key: "example.txt", value: "My File Contents"}]
Input
File Data File Names
string
Key Value List
fileDataFileNames
Default
Notes
File names to apply to the file data inputs. Keys must match the file data keys above.
Example
 
Input
Form Data
string
Key Value List
formData
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
headers
Default
Notes
A list of headers to send with the request.
Example
User-Agent: curl/7.64.1
Input
Max Retry Count
string
maxRetries
Default
0
Notes
The maximum number of retries to attempt.
Example
 
Input
Method
string
/ Required
method
Default
Notes
The HTTP method to use.
Example
 
Input
Query Parameter
string
Key Value List
queryParams
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
/ Required
responseType
Default
json
Notes
The type of data you expect in the response. You can request json, text, or binary data.
Example
 
Input
Retry On All Errors
boolean
retryAllErrors
Default
false
Notes
If true, retries on all erroneous responses regardless of type.
Example
 
Input
Retry Delay (ms)
string
retryDelayMS
Default
0
Notes
The delay in milliseconds between retries.
Example
 
Input
Timeout
string
timeout
Default
Notes
The maximum time that a client will await a response to its request
Example
2000
Input
URL
string
/ Required
url
Default
Notes
This is the URL to call.
Example
/sobjects/Account
Input
Use Exponential Backoff
boolean
useExponentialBackoff
Default
false
Notes
Specifies whether to use a pre-defined exponential backoff strategy for retries.
Example
 

Update File#

Update a file to the specified drive | key: updateFile

InputNotesExample
Input
Connection
connection
/ Required
connection
Notes
 
Example
 
Input
Drive
string
/ Required
driveId
Notes
Provide the unique identifier of a SharePoint drive.
Example
b!WumF-zsD8ku93Y0QqhKM9jVTjPefo6RGrpVCkPpe547Qrf38sox_TYIFuj9sqJhv
Input
File Data
data
/ Required
fileData
Notes
Provide data to be uploaded to your desired SharePoint drive.
Example
These are my file contents.
Input
Item Id
string
/ Required
itemId
Notes
Provide the unique identifier of a SharePoint item Id.
Example
01Q7VXROAW7LCB32ODBRCKZNSJIC544XAQ

Update Site List Subscription Expiration#

Update existing Site List subscription expiration for Microsoft SharePoint | key: updateSiteListSubscriptionExpiration

InputNotes
Input
Connection
connection
/ Required
connection
Notes
 
Input
Expiration Date/Time
string
expirationDateTime
Notes
Expiration date/time for subscription. If unspecified the default will be the current date/time plus 29 days (close to the maximum permitted by the Graph API).
Input
Subscription ID
string
/ Required
subscriptionId
Notes
Subscription ID to manage

Subscriptions have an expiration date/time provided upon creation. This can also be modified with the update API. This action will default to adding 29 days (close to the maximum value for SharePoint resources) to the current date/time unless a value is specified. This is useful for "touching" the subscription to ensure its expiration is extended.

Output Example Payload#

{  "data": {    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#subscriptions/$entity",    "id": "e9d5b726-4478-4412-bfba-268530484566",    "resource": "sites/example.sharepoint.com,17cd4ada-1a76-420e-a7ec-4adaa3327c86,87742bc7-2d2f-404c-8255-d3d9fa9a6561/lists/3a3c0f6a-86da-4567-94d4-3b939da63200",    "applicationId": "e76615c0-13e3-4cd2-8235-a2d628ad13de",    "changeType": "updated",    "clientState": null,    "notificationUrl": "https://example.com/webhook/",    "notificationQueryOptions": null,    "lifecycleNotificationUrl": null,    "expirationDateTime": "2022-11-22T23:32:10.231Z",    "creatorId": "c8edbeda-c453-446c-91ce-c6d5c7310a6c",    "includeResourceData": null,    "latestSupportedTlsVersion": "v1_2",    "encryptionCertificate": null,    "encryptionCertificateId": null,    "notificationUrlAppId": null  }}

Upload File#

Upload a file to the specified drive or folder's drive | key: uploadFile

InputNotesExample
Input
Connection
connection
/ Required
connection
Notes
 
Example
 
Input
Drive
string
/ Required
driveId
Notes
Provide the unique identifier of a SharePoint drive.
Example
b!WumF-zsD8ku93Y0QqhKM9jVTjPefo6RGrpVCkPpe547Qrf38sox_TYIFuj9sqJhv
Input
File Data
data
/ Required
fileData
Notes
Provide data to be uploaded to your desired SharePoint drive.
Example
These are my file contents.
Input
File Name
string
/ Required
fileName
Notes
Provide a string value for the name of the new file.
Example
reports.csv
Input
Folder ID
string
folderId
Notes
Provide the unique identifier of a Sharepoint folder Id.
Example
01Q7VXAXZW7LCB32ODBRCKZNSJIC544FXU