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
Sites.ReadWrite.All 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.

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
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

Create Site List Subscription#

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

InputDefaultNotesExample
Input
Allow Duplicates
boolean
Default
false
Notes
Enable to allow more than one webhook per endpoint
Example
 
Input
Connection
connection
/ Required
Default
 
Notes
 
Example
 
Input
Expiration Date/Time
string
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
Default
Notes
Provide the unique identifier of a SharePoint site list.
Example
48bf81d7-2d37-40a9-b47b-c1d1960d00f87
Input
Notification URL
string
/ Required
Default
Notes
URL to send events of this Subscription to
Example
 
Input
Site Id
string
/ Required
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
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
Notes
 
Input
Subscription ID
string
/ Required
Notes
Subscription ID to manage

Output Example Payload#

{  "data": ""}

Get Current User#

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

InputNotes
Input
Connection
connection
/ Required
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 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 Followed Sites#

List all Followed Sites | key: listFollowedSites

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": {    "@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
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"        }      }    ]  }}

List Subscriptions#

List all subscriptions for Microsoft SharePoint | key: listSubscriptions

InputDefaultNotes
Input
Connection
connection
/ Required
Default
 
Notes
 
Input
Show Instance Webhooks
boolean
/ Required
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
Default
 
Notes
 
Example
 
Input
Data
string
Default
Notes
The HTTP body payload to send to the URL.
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
/ Required
Default
Notes
The HTTP method to use.
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
/ Required
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
Default
false
Notes
If true, retries on all erroneous responses regardless of type.
Example
 
Input
Retry Delay (ms)
string
Default
0
Notes
The delay in milliseconds between retries.
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
 

Update Site List Subscription Expiration#

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

InputNotes
Input
Connection
connection
/ Required
Notes
 
Input
Expiration Date/Time
string
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
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  }}