office365-rest-python-client
Microsoft 365 & Microsoft Graph Library for Python
Decision gist · record as of 2026-08-14
Yes. The library is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive MIT license. It covers a large surface of Microsoft 365 APIs with modern authentication and is widely used (top 5000 PyPI packages). Install it if you need to automate SharePoint, Outlook, Teams, or OneDrive operations from Python.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later.
- Azure AD credentials (tenant, client_id, and certificate or secret) must be configured before authentication.
- Low install friction with a pure-Python wheel.
License · maintenance · safety
permissive license (permissive) — MIT license permits unrestricted use, modification, and distribution in commercial and private projects with only attribution required.
last release 2026-08-02 (12 days) · last repo commit 2026-08-13 · 1,716 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 17,285,720 downloads/mo, #1,124 on PyPI
Alternatives
Verify before relying
pip install office365-rest-python-client
from office365.sharepoint.client_context import ClientContext
ctx = ClientContext("{site_url}").with_client_certificate(
tenant="{tenant}", client_id="{client_id}",
thumbprint="{thumbprint}", cert_path="./cert.pem"
)
web = ctx.web.get().execute_query()
print(f"Site title: {web.title}")- Whether the library handles pagination and throttling transparently for large result sets beyond the 5000-row threshold mentioned in examples.
- Current API coverage breadth across all Microsoft Graph endpoints (OneNote, Planner, etc.) and any known gaps.
- Performance characteristics and memory usage when working with large files or bulk operations.
What it is and what it does
office365-rest-python-client is a Python wrapper around Microsoft 365 and Microsoft Graph REST APIs. It provides two main entry points: ClientContext for SharePoint REST API v1 operations (lists, files, folders, permissions) and GraphClient for Microsoft Graph operations (Outlook, OneDrive, Teams, OneNote, Planner, users, groups). All authentication flows use Azure AD via the msal library, with support for certificate-based app-only access, interactive browser login, device code flow, and username/password delegation.
The library abstracts away REST call details, batching, and pagination. It handles common patterns like bulk item creation, filtering, selecting fields, and expanding related objects through a fluent query interface. It supports multiple Azure environments (Global, US Government variants, China, Germany) and is actively maintained with recent releases and community sponsorship options available.
Use it for
- Automate SharePoint list operations: bulk-create items, query with filters, manage permissions and folders programmatically.
- Build integrations with Outlook, OneDrive, or Teams using Microsoft Graph without writing raw HTTP requests.
- Migrate legacy SAML-based SharePoint automation to modern Azure AD certificate-based authentication.
- Sync data between SharePoint lists and external systems via scheduled Python scripts.
- Manage Microsoft 365 users, groups, and organizational structure through Graph API.
- Upload, download, and organize files in SharePoint document libraries and OneDrive.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The library is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive MIT license. It covers a large surface of Microsoft 365 APIs with modern authentication and is widely used (top 5000 PyPI packages). Install it if you need to automate SharePoint, Outlook, Teams, or OneDrive operations from Python.
Install
office365-rest-python-client on PyPI
Before you install
Low install friction with a pure-Python wheel. Actively maintained with a release 12 days ago and 1716 GitHub stars. Depends on msal, pytz, requests, and typing-extensions—all stable, widely-used libraries.
Requires Python 3.8 or later. Azure AD credentials (tenant, client_id, and certificate or secret) must be configured before authentication.
License in practice
MIT license permits unrestricted use, modification, and distribution in commercial and private projects with only attribution required.
Quickstart
pip install office365-rest-python-client
from office365.sharepoint.client_context import ClientContext
ctx = ClientContext("{site_url}").with_client_certificate(
tenant="{tenant}", client_id="{client_id}",
thumbprint="{thumbprint}", cert_path="./cert.pem"
)
web = ctx.web.get().execute_query()
print(f"Site title: {web.title}")
Verify before relying
- Whether the library handles pagination and throttling transparently for large result sets beyond the 5000-row threshold mentioned in examples.
- Current API coverage breadth across all Microsoft Graph endpoints (OneNote, Planner, etc.) and any known gaps.
- Performance characteristics and memory usage when working with large files or bulk operations.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesmsalpytzrequeststyping-extensions |
| Maintenance | Actively maintained 12 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 17,285,720 / month, #1,124 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries |
Evidence: office365_rest_python_client-3.0.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “teams outlook onedrive python”
- office365-rest-python-clientPython client library for Microsoft 365 and Microsoft Graph APIs,…
- o365O365 provides a Pythonic interface to Microsoft Graph and Office 365…
- msgraphfsProvides a filesystem interface to Microsoft Graph API drives…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also msgraph-sdk · o365 · SharePlum · sharepy · microsoftgraph-python · office365 · msgraphfs · msgraph-beta-sdk · PowerPlatform-Dataverse-Client · microsoft-teams-api