--- id: office365-rest-python-client version: "3.0.0" license: The MIT License (MIT) Copyright (c) 2016 Vadim Gremyachev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) license_treatment: permissive maintenance: active --- # office365-rest-python-client — Microsoft 365 & Microsoft Graph Library for Python License: permissive · Maintenance: active · Downloads: 17.3M/mo ## 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 above — verify before relying. Python client library for Microsoft 365 and Microsoft Graph APIs, covering SharePoint REST API v1, Outlook, OneDrive, Teams, OneNote, Planner, and modern Azure AD authentication flows. 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 pip install office365-rest-python-client uv add office365-rest-python-client poetry add office365-rest-python-client ## Installing office365-rest-python-client 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. 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}") Requires Python 3.8 or later. Azure AD credentials (tenant, client_id, and certificate or secret) must be configured before authentication. 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: The MIT License (MIT) Copyright (c) 2016 Vadim Gremyachev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 17.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags microsoft 365 python client, sharepoint rest api python, microsoft graph python library, azure ad authentication python, office 365 api wrapper, teams outlook onedrive python, sharepoint list items python, microsoft-365, rest-api-client, azure-ad [View on SkillFed](https://skillfed.io/packages/office365-rest-python-client) · [View on PyPI](https://pypi.org/project/office365-rest-python-client/)