Share point

Learn how to use Share point with Composio

Overview

SLUG: SHARE_POINT

Description

SharePoint is a Microsoft platform for document management and intranets, enabling teams to collaborate, store, and organize content securely and effectively

Authentication Details

client_id
stringRequired
client_secret
stringRequired
oauth_redirect_uri
stringDefaults to https://backend.composio.dev/api/v1/auth-apps/add
scopes
stringDefaults to https://{{subdomain}}.sharepoint.com/.default,offline_access
subdomain
stringRequired

Connecting to Share point

Create an auth config

Use the dashboard to create an auth config for the Share point toolkit. This allows you to connect multiple Share point accounts to Composio for agents to use.

1

Select App

Navigate to [Share point](https://platform.composio.dev?next_page=/marketplace/Share point).

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Share point Auth Config”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using OAuth2

1from composio import Composio
2
3# Replace these with your actual values
4share_point_auth_config_id = "ac_YOUR_SHARE_POINT_CONFIG_ID" # Auth config ID created above
5user_id = "0000-0000-0000" # UUID from database/application
6
7composio = Composio()
8
9
10def authenticate_toolkit(user_id: str, auth_config_id: str):
11 connection_request = composio.connected_accounts.initiate(
12 user_id=user_id,
13 auth_config_id=auth_config_id,
14 )
15
16 print(
17 f"Visit this URL to authenticate Share point: {connection_request.redirect_url}"
18 )
19
20 # This will wait for the auth flow to be completed
21 connection_request.wait_for_connection(timeout=15)
22 return connection_request.id
23
24
25connection_id = authenticate_toolkit(user_id, share_point_auth_config_id)
26
27# You can also verify the connection status using:
28connected_account = composio.connected_accounts.get(connection_id)
29print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the [Share point toolkit’s playground](https://app.composio.dev/app/Share point)

Python
1from composio import Composio
2from openai import OpenAI
3import json
4
5openai = OpenAI()
6composio = Composio()
7
8# User ID must be a valid UUID format
9user_id = "0000-0000-0000" # Replace with actual user UUID from your database
10
11tools = composio.tools.get(user_id=user_id, toolkits=["SHARE_POINT"])
12
13print("[!] Tools:")
14print(json.dumps(tools))
15
16def invoke_llm(task = "What can you do?"):
17 completion = openai.chat.completions.create(
18 model="gpt-4o",
19 messages=[
20 {
21 "role": "user",
22 "content": task, # Your task here!
23 },
24 ],
25 tools=tools,
26 )
27
28 # Handle Result from tool call
29 result = composio.provider.handle_tool_calls(user_id=user_id, response=completion)
30 print(f"[!] Completion: {completion}")
31 print(f"[!] Tool call result: {result}")
32
33invoke_llm()

Tool List

Tool Name: Add Attachment to List Item

Description

Tool to add an attachment to a SharePoint list item. Use when you need to upload a binary file as an attachment to a specified list item.

Action Parameters

content_base64
string
content_text
string
file_content
object
file_name
stringRequired
item_id
integerRequired
list_title
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Add Role Assignment to List Item

Description

Tool to add a role assignment to a list item. Use when granting specific permissions to a user or group after breaking inheritance if needed.

Action Parameters

item_id
integerRequired
list_title
stringRequired
principal_id
integerRequired
role_definition_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Add Role Assignment to SharePoint List

Description

Tool to add a role assignment to a SharePoint list. Use when granting permissions to a user or group on a specific list.

Action Parameters

list_title
stringRequired
principal_id
integerRequired
role_definition_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Break Role Inheritance on List Item

Description

Tool to break permission inheritance on a list item. Use when you need to uniquely set permissions on an item after copying or clearing parent assignments.

Action Parameters

clear_subscopes
boolean
copy_role_assignments
booleanRequired
item_id
integerRequired
list_title
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Break Role Inheritance on List

Description

Tool to break permission inheritance on a SharePoint list. Use when you need unique permissions for a list after copying parent roles and optionally clearing subscopes.

Action Parameters

clear_subscopes
booleanRequired
copy_role_assignments
booleanRequired
list_title
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Check In SharePoint File

Description

Tool to check in a file. Use after uploading or editing a document and you're ready to finalize changes.

Action Parameters

checkintype
integerRequired
comment
stringRequired
server_relative_path
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create SharePoint List Field

Description

Tool to create a new field (column) in a SharePoint list. Use when you need to programmatically add a column after confirming the list GUID.

Action Parameters

enforce_unique_values
boolean
field_type_kind
integerRequired
list_guid
stringRequired
required
boolean
static_name
stringRequired
title
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create List Item in Folder

Description

Tool to create a list item in a specific folder. Use when you need to add an item under a subfolder path within a SharePoint list.

Action Parameters

check_in_comment
string
folder_url
stringRequired
list_title
stringRequired
values
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete SharePoint Folder

Description

Tool to delete a folder. Use when you need to remove a folder by server-relative URL after confirming its path.

Action Parameters

etag
stringDefaults to *
server_relative_url
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete SharePoint List

Description

Tool to delete a SharePoint list. Use when you need to remove a list by its GUID after confirming the correct list identifier.

Action Parameters

if_match
stringDefaults to *
list_guid
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete SharePoint List Item

Description

Tool to delete a SharePoint list item. Use when you need to permanently remove an item by its ID. Use after obtaining the item's ETag to ensure concurrency control.

Action Parameters

item_id
integerRequired
list_title
stringRequired
match_etag
stringDefaults to *

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Recycle Bin Item Permanently

Description

Tool to permanently delete a SharePoint Recycle Bin item. Use after confirming the item's GUID to remove it irrevocably.

Action Parameters

recyclebinitemid
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Download File by Server-relative URL

Description

Tool to download a file by server-relative URL. Use when you need to fetch the raw bytes of a SharePoint file by its server-relative path.

Action Parameters

server_relative_url
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Ensure SharePoint User

Description

Tool to add or resolve a user in a SharePoint site by login name. Use when you need to ensure a user exists in the site user list.

Action Parameters

login_name
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Follow SharePoint Actor

Description

Tool to follow a user, site, document, or tag. Use when making the current user start following specified actor.

Action Parameters

account_name
string
actor_type
integerRequired
content_uri
string
tag_guid
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Content Types for List

Description

Tool to retrieve all content types for a specific SharePoint list by GUID. Use when you need the content type IDs, names, and descriptions of every content type in a list.

Action Parameters

list_guid
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Current SharePoint User

Description

Tool to retrieve the current user for the site. Use after authenticating to get the current SharePoint user.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get SharePoint Folder by Server Relative URL

Description

Tool to retrieve a folder by its server-relative URL. Use when you need to fetch folder metadata by path before further operations.

Action Parameters

expand
string
select
string
server_relative_url
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Group Users

Description

Tool to list users in a SharePoint group by its name. Use when you need to retrieve all members of a specific group.

Action Parameters

$expand
string
$filter
string
$orderby
string
$select
string
$skiptoken
string
$top
integer
group_name
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Download List Item Attachment

Description

Tool to download an attachment from a SharePoint list item. Use when retrieving the binary contents of a specific attachment after confirming the list title, item ID, and filename.

Action Parameters

file_name
stringRequired
item_id
integerRequired
list_title
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get SharePoint List by GUID

Description

Tool to retrieve a SharePoint list by its GUID. Use when you need to fetch list metadata by its unique identifier.

Action Parameters

list_guid
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get SharePoint List By Title

Description

Tool to retrieve a SharePoint list by its title. Use when you need to fetch list metadata by title.

Action Parameters

$expand
string
$select
string
list_title
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get List Item by ID

Description

Tool to retrieve a SharePoint list item by ID. Use when you need to fetch a specific item after knowing its ID.

Action Parameters

$expand
string
$select
string
item_id
integerRequired
list_title
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get List Item Entity Type Full Name

Description

Tool to get the entity type name for list items. Use when preparing to create or update items and need the correct __metadata.type.

Action Parameters

list_title
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get List Item ETag

Description

Tool to fetch the ETag of a SharePoint list item. Use when you need the ETag for concurrency control before update or delete operations.

Action Parameters

item_id
integerRequired
list_title
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get SharePoint List Items

Description

Tool to retrieve items from a SharePoint list. Use when you need to fetch list entries with optional OData parameters.

Action Parameters

expand
string
filter
string
list_title
stringRequired
orderby
string
select
string
skiptoken
string
top
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Followed Entities

Description

Tool to get entities the current user is following. Use when you need to retrieve followed users, documents, sites, or tags after authentication.

Action Parameters

types
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get My Followers

Description

Tool to get the current user's followers. Use when you need to list all users who follow the current user.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Role Definitions

Description

Tool to list role definitions. Use when you need to retrieve permission levels at the web level.

Action Parameters

$expand
string
$filter
string
$orderby
string
$select
string
$skiptoken
string
$top
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get SharePoint Site Collection Info

Description

Tool to fetch site collection metadata. Use when you need a site's URL, ID, and root web URI before subsequent calls.

Action Parameters

$expand
string
$select
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get User Effective Permissions on Web

Description

Tool to get a user's effective permissions on the current Web. Use when you need to verify a user's permissions before performing operations on this site.

Action Parameters

login_name
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Check Follow Status

Description

Tool to check if the current user is following a specified actor. Use when verifying follow status before performing follow or unfollow operations.

Action Parameters

account_name
string
actor_type
integerRequired
content_uri
string
tag_guid
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List SharePoint Lists

Description

Tool to list all lists in the current web. Use when you need to retrieve every list from the SharePoint site.

Action Parameters

expand
string
filter
string
orderby
string
select
string
skiptoken
string
top
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Files in Folder

Description

Tool to list files within a SharePoint folder. Use when you need to enumerate all files in a folder by its server-relative URL.

Action Parameters

expand
string
folder_name
stringRequired
orderby
string
select
string
skiptoken
string
top
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Item Attachments

Description

Tool to list all attachments for a SharePoint list item. Use when you need to retrieve filenames and server-relative URLs of each attachment after confirming the list title and item ID.

Action Parameters

item_id
integerRequired
list_title
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Recycle Bin Items

Description

Tool to list items in the SharePoint Recycle Bin. Use when you need to retrieve deleted items and page through results.

Action Parameters

expand
string
filter
string
orderby
string
select
string
skiptoken
string
top
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Site Groups

Description

Tool to list SharePoint site groups for a site collection. Use when you need to see all groups and their settings before managing permissions.

Action Parameters

$expand
string
$filter
string
$orderby
string
$select
string
$skip
integer
$top
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Site Users

Description

Tool to list users in the site collection. Use when you need to retrieve all users in the current site collection.

Action Parameters

$expand
string
$filter
string
$orderby
string
$select
string
$skiptoken
string
$top
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Log SharePoint Event

Description

Tool to log user analytics events in SharePoint. Use when you need to record a custom usage event via REST API for tracking after triggering a relevant action.

Action Parameters

event_type_id
integerRequired
item_id
stringRequired
scope_id
stringRequired
site
stringRequired
user
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Recycle SharePoint File

Description

Tool to move a file to the Recycle Bin. Use when you need to recycle a file after confirming its folder and filename paths.

Action Parameters

file_relative_url
stringRequired
folder_relative_url
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Recycle SharePoint List Item

Description

Tool to move a list item to the Recycle Bin. Use when you need to soft-delete an item but preserve the ability to restore it.

Action Parameters

item_id
integerRequired
list_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Rename SharePoint Folder

Description

Tool to rename a SharePoint folder. Use when you need to update a folder's name by its server-relative URL. Use after retrieving __metadata.type and form digest.

Action Parameters

__metadata.type
stringRequired
match_etag
stringDefaults to *
new_name
stringRequired
server_relative_folder_url
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Render List Data As Stream

Description

Tool to render list data as a stream. Use when you need to retrieve list items including complex fields, schema, and grouping via SharePoint REST API.

Action Parameters

list_server_relative_url
stringRequired
parameters
object
query_params
object

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Restore Recycle Bin Item

Description

Tool to restore a SharePoint Recycle Bin item. Use when you need to recover a deleted item by providing its GUID.

Action Parameters

recyclebinitemid
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Search SharePoint Site

Description

Tool to perform a SharePoint search query using KQL or FQL. Use when you need to retrieve relevant search results from your site via the REST API.

Action Parameters

querytext
stringRequired
refinementfilters
string
rowlimit
integer
selectproperties
string
startrow
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Search Suggest

Description

Tool to get search query suggestions. Use when you need to provide autocomplete options for user search input.

Action Parameters

Culture
integer
EnableQueryRules
booleanDefaults to True
EnableStemming
booleanDefaults to True
ShowPeopleNameSuggestions
booleanDefaults to True
fCapitalizeFirstLetters
boolean
fHitHighlighting
booleanDefaults to True
fPreQuerySuggestions
boolean
fPrefixMatchAllTerms
boolean
iNumberOfQuerySuggestions
integerDefaults to 5
iNumberOfResultSuggestions
integerDefaults to 5
querytext
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Check Out SharePoint File

Description

Tool to check out a file in a document library. Use when you need to lock a file before making changes.

Action Parameters

server_relative_path
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create SharePoint Folder

Description

Creates a new folder in SharePoint using the REST API.

Action Parameters

document_library
stringDefaults to Shared Documents
folder_name
stringRequired
relative_path
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create SharePoint List

Description

Creates a new list in SharePoint using the REST API.

Action Parameters

description
string
name
stringRequired
template
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create SharePoint List Item

Description

Creates a new item in a SharePoint list.

Action Parameters

item_properties
objectRequired
list_name
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create SharePoint User

Description

Creates a new user in SharePoint.

Action Parameters

email
stringRequired
login_name
stringRequired
title
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Find SharePoint User

Description

Finds a user in both Microsoft Graph and SharePoint to verify their existence and status.

Action Parameters

email
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Remove SharePoint User

Description

Removes a user from SharePoint. Will not fail if user doesn't exist.

Action Parameters

email
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Upload File to Folder

Description

Tool to upload a file to a SharePoint document library or folder. Use when you need to programmatically add or update a file in a document library.

Action Parameters

content_base64
string
content_text
string
file
object
file_name
string
folder_relative_url
stringRequired
overwrite
booleanDefaults to True

Action Response

data
objectRequired
error
string
successful
booleanRequired