Incora logo
AI Consulting
Expert Advice On Tech, Architecture And AI
Backend Development
Server-side Architecture And APIs
Frontend Development
Modern, Responsive Frontend Applications
UI/UX Design
Creating Intuitive User Experiences
Software QA & Testing
Ensuring Software Quality And Reliability
DevOps Services
Streamline Your Development Operations
Team Extension
Boost Your Team With Skilled Niche Developers
Dedicated Team
A Full Team Focused Solely On Your Project Needs
AI Agents
Custom Agents That Handle Real Business Tasks
AI Voice Agents
Voice Assistants For Calls And Support
Voice App Development
Speech-To-Text And Voice Control For Your Apps
Agentic Automation
Multi-Step Workflows Run By AI Agents
AI Business Automation
Embed AI Into Your CRM, ERP And Daily Operations
Legacy Modernization
Upgrade Old Systems Faster With AI
Code Audit & Due Diligence
Check If AI-Built Code Is Safe To Ship
MCP Server Development
Connect AI Clients To Your Internal Systems
RAG Development
Accurate AI Answers From Your Own Data
Business Central Consulting
Setup, Customization And Migration To BC
Dynamics 365 CRM
CRM Consulting And Integration With Your Stack
SharePoint Consulting
Custom Intranets And Document Workflows
SAP Consulting
SAP Development, Setup And Optimization
NetSuite Integration
Connect NetSuite With Your Business Systems
ServiceNow Development
Custom Apps And Integrations On ServiceNow
Procore Integration
Custom Procore Integrations For Construction
RPA Development
Bots That Automate Repetitive Workflows
Legal Software Development
Custom Software And Integrations For Law Firms
Custom Software Development
Tailored Software Solutions For Unique Business Needs
Legacy App Modernization
Modernize And Transform Legacy Systems
Saas Development
End-To-End Saas Development From Idea To Launch
Business Process Automation
Automate Workflows And Business Operations
Startup Development
Rapid Product Development For Startups To Scale Quickly
Cross-Platform Apps
One Codebase For iOS And Android
Smart Contracts
Audit-Ready Solidity For DeFi, NFT And DAO
Real Estate
Smart Home Systems And Property Management
Fintech
Payment Processing And Banking Solutions
Booking Systems
Scheduling And Reservation Platforms
Construction
Site Management And Resource Planning
Our specialized branch
Management Systems
Workflow Optimization And Reporting Tools
Delivery & Shipping
Order Tracking And Route Optimization
Manufacturing
Production Systems And Quality Control
Supply Chain
Logistics Tracking And Inventory Management
Energy
Monitoring And Sustainable Tech solutions
Healthcare
Patient Portals And Telemedicine Platforms
Edutech
Learning Platforms And Course Management
IT Tools
Developer Tools And Internal Platforms
React.Js Developers
Build Dynamic Uls With React And Next.Js
Three.Js Developers
3D Graphics And WebGL Experiences
Next.Js Developers
Server-Rendered React With Next.Js
JavaScript Developers
Cross-Browser J Development
Vue.Js Developers
Lightweight And Performant Vue Interfaces
Redux Developers
State Management For Complex Apps
Angular Developers
Enterprise-Grade Angular Applications
Node.Js Developers
Scalable Server-Side Javascript Applications
GoLang Developers
High-Performance Microservices in Go
Full Stack Developers
End-To-End Web Application Development
Python Developers
Data-Driven Backends And APIs
NestJS Developers
Progressive Node.Js Framework
Flask Developers
Lightweight Python Web Framework
Express.Js Developers
Fast, Minimalist Web Framework
Django Developers
High-Level Python Web Framework
MERN Stack Developers
MongoDB, Express, React, Node.Js
AWS Developers
Cloud Architecture On Amazon Web Services
DevOps Engineers
CI/CD Pipelines And Infrastructure Automation
Azure Developers
Microsoft Azure Cloud Solutions
Google Cloud Developers
GCP Infrastructure And Services
Cloud Engineers
Multi-Cloud Infrastructure Management
Data Engineers
Data Pipelines And Warehouse Design
WebRTC Developers
Real-Time Communication Solutions
QA Engineers
Automated And Manual Testing Specialists
Offshore Developers
Cost-Effective Remote Development Teams
ERP Developers
Enterprise Resource Planning Solutions
Saas Developers
Saas Product Development Specialists
author photo

By Bohdan Vasylkiv

 - CEO & Co-Founder

SharePoint API Guide: REST API vs. Microsoft Graph (with Examples)

SharePoint API explained: REST API vs Microsoft Graph, Entra ID auth, examples in Python, throttling and what changed after the 2026 Add-ins retirement.

19 min read
Updated: December 03, 2026Created: October 15, 2026
18 views

Key Takeaways

  • The SharePoint API has two main options: the SharePoint REST service and Microsoft Graph.
  • Use Graph for most new projects and REST for permissions, views, and other settings Graph doesn't cover.
  • Since April 2, 2026, SharePoint Online accepts only Microsoft Entra ID tokens, so old Add-in logins no longer work.
  • Each app has a daily and per-minute request budget, so plan for retries and batching from day one.

You have files and lists in SharePoint, and you want another system to read or update them. Maybe it's a CRM, a reporting script, or a nightly sync job. To do that, you need the Microsoft SharePoint API.

The catch is that Microsoft offers several ways to connect, and the rules changed in 2026. Below, you'll find which SharePoint API to pick, how to set up access step by step, working request examples, and what to do when SharePoint starts rejecting your calls.

Does SharePoint Have an API?

Yes. If you searched does SharePoint have an API, you probably found several answers at once. That's because SharePoint has more than one.

Through the SharePoint API, your code can do almost everything a user does in the browser: read and create list items, upload and download files, change column values, manage folders, and set permissions.

In practice, the SharePoint Online API means one of three things:

  • REST service: URLs that start with https://{tenant}.sharepoint.com/_api/
  • Microsoft Graph: URLs that start with https://graph.microsoft.com/v1.0/sites/
  • Client libraries: CSOM and PnP, which call those same endpoints for you

You may also see the word "plugin" in older SharePoint guides. A plugin runs inside SharePoint and changes what users see. An API is called from outside, by your own app or script. If you want the full comparison, read our guide on API vs plugin. For SharePoint, this matters because the old plugin model (Add-ins) has been shut down, while the APIs keep working.

Three ways to access SharePoint data: REST service, Microsoft Graph, and client libraries like CSOM and PnPClick to expand

SharePoint REST API vs. Microsoft Graph: Which One to Use

Both options work with the same data. They differ in how much they cover and how they handle login.

Microsoft's current SharePoint API documentation recommends Graph for new apps. Still, some tasks are only possible through REST. So many real projects use Graph for everyday work and call REST for the rest.

Here's a quick way to decide:

Your taskUse
Read and write list items, upload filesGraph
Work with SharePoint plus Teams, Outlook, or OneDriveGraph
Sync only changed itemsGraph (delta queries)
Break permission inheritance, create custom rolesREST
Manage views, content types, site settingsREST

SharePoint REST API

The SharePoint REST API has been around since SharePoint 2013. It works only with SharePoint, and it reaches deeper into it than Graph does.

A request to read items from a list called "Deals" looks like this:

GET https://contoso.sharepoint.com/sites/sales/_api/web/lists/getbytitle('Deals')/items

Keep two limits in mind, though. Each request goes to one specific SharePoint domain, and app-only access requires a certificate. We'll come back to certificates in the authentication section.

Microsoft Graph API for SharePoint

The SharePoint Graph API is part of Microsoft Graph, one shared endpoint for all of Microsoft 365. With a single token, your app can work with SharePoint, OneDrive, Teams, and Outlook.

Graph uses IDs instead of names. So the first question is usually: where do I get the site ID? You request it by the site's path:

GET https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com:/sites/sales

The response contains the id. Then call /sites/{site-id}/lists to get list IDs and /sites/{site-id}/drives to get document library IDs. Save these IDs in your config. Site names can change, and IDs stay the same.

Graph also has official SDKs for Python, .NET, JavaScript, and Java, and it accepts client secrets for app-only access.

SharePoint Search API, CSOM, and PnP Libraries

The Search API finds content across many sites, like all contracts with a certain tag. REST offers /_api/search/query with KQL syntax, and Graph has /search/query. Both return only what the caller has access to.

CSOM is a .NET library that turns API calls into C# objects. You'll mostly meet it in older projects and admin scripts.

PnP Framework, PnPjs, and PnP PowerShell are free community tools that run on top of the Microsoft SharePoint API and save a lot of code. For migrations and bulk site setup, PnP PowerShell is usually the fastest route.

What Changed in 2026: SharePoint Add-ins and ACS Retirement

On April 2, 2026, Microsoft turned off SharePoint Add-ins and Azure Access Control Services (ACS) in SharePoint Online. For new tenants, they stopped working back on November 1, 2024.

What stopped working:

  • Apps registered through AppRegNew.aspx with their client ID and secret
  • SharePoint-hosted and provider-hosted Add-ins
  • Remote event receivers registered through ACS

What to use now:

  • Microsoft Entra ID app registrations for login
  • Graph API SharePoint endpoints or REST for data
  • SharePoint Framework (SPFx) for custom UI inside SharePoint
  • Webhooks instead of remote event receivers

If an old integration stopped working in April, ACS is almost certainly the reason. The fix is usually small: register the app in Entra ID and replace the code that gets the token.

Comparison of SharePoint features retired on April 2, 2026, and their replacements: Entra ID, Graph or REST, SPFx, and webhooksClick to expand

How to Authenticate to the SharePoint API with Microsoft Entra ID

Every request needs an access token from Microsoft Entra ID. Here's how to get one.

Register an App in Microsoft Entra ID

  1. In the Microsoft Entra admin center, go to App registrations and click New registration.
  2. Enter a name and choose "Single tenant" unless other companies will use your app.
  3. Copy the Application (client) ID and the Directory (tenant) ID.
  4. In Certificates & secrets, upload a certificate. A client secret is enough only if you'll call Graph and never REST.
  5. In API permissions, add the permissions you need and click Grant admin consent.
Five steps to register an app in Microsoft Entra ID for SharePoint accessClick to expand

Delegated vs. Application Permissions

This is the most important choice in the setup.

Delegated permissions mean the app acts as a signed-in user. It sees only what that user can see. Choose them for web apps, Teams tabs, and anything where a person clicks a button.

Application permissions mean the app works on its own, with no user. Choose them for background syncs, scheduled jobs, and system-to-system integrations.

Delegated permissions act as a signed-in user, application permissions run without a user, and Sites.Selected limits access to specific sitesClick to expand

Be careful with application permissions like Sites.ReadWrite.All. They open every site in your company. A safer choice is Sites.Selected: the app gets nothing by default, and an admin grants it access to specific sites with one request:

POST https://graph.microsoft.com/v1.0/sites/{site-id}/permissions
{ "roles": ["write"],
  "grantedToIdentities": [{ "application": { "id": "{client-id}", "displayName": "Sync App" } }] }

Get an Access Token

Background apps use the client credentials flow. The scope you request depends on the API:

  • For Graph: https://graph.microsoft.com/.default
  • For REST: https://{tenant}.sharepoint.com/.default

Here's a common surprise. The SharePoint REST API rejects app-only tokens that were created with a client secret. You'll get the error "Unsupported app only token." The fix is to use a certificate. Graph accepts both.

SharePoint API Examples

The examples below use the SharePoint Graph API, with REST versions where they help.

Read List Items

Graph:

GET /v1.0/sites/{site-id}/lists/{list-id}/items?expand=fields(select=Title,Status)&$top=100

REST:

GET /_api/web/lists/getbytitle('Deals')/items?$select=Title,Status&$top=100
Accept: application/json;odata=nometadata

Results come in pages. If the response has @odata.nextLink (Graph) or odata.nextLink (REST), call that URL to get the next page. Repeat until the link is gone.

Upload and Update Documents

To upload a file up to 250 MB, send one request:

PUT /v1.0/drives/{drive-id}/root:/Contracts/acme.pdf:/content

If a file with that name exists, it gets replaced. For larger files, create an upload session with createUploadSession and send the file in parts. Then, if the connection drops, you continue from the last part instead of starting over.

Manage Metadata and Permissions

To change column values on a file or list item, use the column's internal name:

PATCH /v1.0/sites/{site-id}/lists/{list-id}/items/{item-id}/fields
{ "Status": "Signed", "Region": "West" }

To share a file with specific people, use Graph's /invite endpoint. To break permission inheritance or assign a custom role, switch to REST: breakroleinheritance and roleassignments/addroleassignment.

Use the SharePoint REST API with Python

Microsoft doesn't ship a separate SharePoint Python API. Instead, you have three reliable options: msal with requests, the Office365-REST-Python-Client library, or the Microsoft Graph Python SDK.

Here's a short SharePoint REST API Python script that logs in with a certificate and reads list items:

import msal, requests

app = msal.ConfidentialClientApplication(
    CLIENT_ID,
    authority=f"https://login.microsoftonline.com/{TENANT_ID}",
    client_credential={"private_key": KEY, "thumbprint": THUMBPRINT},
)
token = app.acquire_token_for_client(
    scopes=["https://contoso.sharepoint.com/.default"])["access_token"]

url = "https://contoso.sharepoint.com/sites/sales/_api/web/lists/getbytitle('Deals')/items"
r = requests.get(url, headers={"Authorization": f"Bearer {token}",
                               "Accept": "application/json;odata=nometadata"})
print(r.json()["value"])

For Graph, change the scope to https://graph.microsoft.com/.default and use a Graph URL. Everything else stays the same.

SharePoint API Throttling, Batching, and Error Handling

SharePoint limits how much each app can request. The budget is counted in resource units, per minute and per day, and it grows with the number of licenses in your company:

LicensesPer minutePer day
Up to 1,0001,2001,200,000
1,001–5,0002,4002,400,000
50,000+6,0006,000,000

Requests have different prices. Reading one item costs 1 unit, reading a list or creating, updating, or uploading costs 2, and adding $expand=permissions costs 5.

When you go over the limit, the SharePoint Online API returns HTTP 429 or 503 with a Retry-After header. To stay within limits:

  • Wait as long as Retry-After says: Throttled requests still count toward your limit, so instant retries only make it worse.
  • Check RateLimit headers: After you use 80% of your per-minute budget, responses include RateLimit-Remaining and RateLimit-Reset. Slow down when you see them.
  • Group requests: Graph's $batch endpoint sends up to 20 requests in one call.
  • Sync only changes: Delta queries return only items that changed since the last run.
  • Name your app: Set a User-Agent like NONISV|YourCompany|SyncApp/1.0 so Microsoft can identify your traffic.

Other common errors are easy to fix. 401 means the token expired or has the wrong scope. 403 means the app lacks permission for that site. 404 usually means a wrong site ID or list ID.

SharePoint API error codes 429, 503, 401, 403, and 404 with the cause and fix for eachClick to expand

Follow these rules, and your SharePoint API client can run for years without blocks.

SharePoint Integration Examples

Most teams spend their day in a CRM, a service desk, or Teams. A good SharePoint integration lets them reach the right documents from there, without switching apps.

Salesforce SharePoint Integration

Sales reps work in Salesforce, while contracts often live in SharePoint. Salesforce Files Connect shows SharePoint Online files inside Salesforce without any code.

When you need more, a custom SharePoint integration can create a folder for each new opportunity, copy deal data into SharePoint columns, and add a link to the signed contract on the CRM record. Graph webhooks tell your service when a file changes, so both systems stay up to date.

Dynamics 365 SharePoint Integration

Dynamics 365 has a built-in option that stores record documents in SharePoint. Once you turn it on, each account or case gets its own folder.

If you need your own folder structure, retention rules, or a link to your ERP, you'll need a custom integration built on the API. For connecting several business systems at once, see our guide to CRM and ERP integration.

SharePoint integration examples with Salesforce, Dynamics 365, ServiceNow, and Microsoft TeamsClick to expand

ServiceNow and Microsoft Teams Integration with SharePoint

ServiceNow calls Graph through IntegrationHub. For example, when a change request gets approved, ServiceNow copies the runbook into a SharePoint library and tags it with the ticket number.

With Teams, the connection already exists: the Files tab is a SharePoint library. Using Graph, you can post a message to a channel each time a new file appears in a certain folder.

SharePoint API Best Practices

  • Give the app as little access as possible: Start with Sites.Selected or delegated permissions.
  • Default to Graph: Use REST only for tasks Graph can't handle.
  • Use a certificate: REST requires it for app-only access, and it's safer than a secret.
  • Request only the fields you need: $select makes responses smaller and cheaper.
  • Index columns in large lists: Filtering a list with more than 5,000 items fails on columns without an index.
  • Use webhooks: They notify you about changes, so you don't have to check every few minutes.
  • Follow announcements: The SharePoint API documentation and the Graph changelog warn about changes months in advance.

These habits keep your SharePoint API code fast, safe, and easy to support.

Not sure where to start with your SharePoint API integration?

We can help you figure out what's actually slowing you down and what to build first.

Final Takeaway

For most tasks, start with Graph. Add REST when you need permissions, views, or site settings. Use Entra ID for login and plan for limits from the start.

If you have integrations built before 2026, check them now. Anything that still relies on ACS has already stopped working, and the fix usually comes down to a new app registration and new token code.

Bigger projects take more planning, like moving several old Add-ins or connecting SharePoint to a CRM and ERP at once. That's the kind of work Incora's team covers through SharePoint consulting services: we map what you have, pick the right API for each part, and build the SharePoint integration so it keeps working as your systems change.

FAQ

Does SharePoint have an API?

Yes. SharePoint Online has a REST service at /_api/ and full support in Microsoft Graph. Both let you work with sites, lists, files, and permissions.

Should I use the SharePoint REST API or Microsoft Graph?

Start with Graph, especially if your app also works with Teams or Outlook. Use the SharePoint REST API for custom roles, views, and site settings that Graph doesn’t support.

How do I authenticate to the SharePoint REST API?

Register an app in Microsoft Entra ID, add permissions, upload a certificate, and request a token with the https://{tenant}.sharepoint.com/.default scope.

Do SharePoint Add-ins still work after April 2026?

No. Since April 2, 2026, Add-ins and ACS no longer work in SharePoint Online. Move UI parts to SPFx and data access to Entra ID apps.

Can I use the SharePoint API with Python?

Yes. There’s no separate SharePoint Python API, but msal with requests, Office365-REST-Python-Client, and the Graph Python SDK all work well.

What are the SharePoint API throttling limits?

SharePoint API limits are set for each app in each tenant. With up to 1,000 licenses, an app gets 1,200 resource units per minute and 1.2 million per day. The limits grow with the license count.

AI Summary
PerplexityChatGPTClaudeGemini

Get in Touch

Got no clue where to start? Why don’t we discuss your idea?

🌐
Anastasiia Pryshliak
Anastasiia Pryshliak
Senior Partnerships Manager

Just pick a time. No forms.

30 minGoogle MeetNo commitment