microsoftgraph-python
API wrapper for Microsoft Graph written in Python
Decision gist · record as of 2026-08-14
Yes, if you need a lightweight Python wrapper for Microsoft Graph and can accept dormant maintenance. The low install friction (only requests dependency), MIT license, and broad API coverage make it suitable for straightforward Graph integration. However, verify that the endpoints you need are stable and that the package's v1.0.0+ breaking changes align with your use case; consider monitoring for security updates independently since active maintenance has stalled.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a Microsoft Azure app registration with CLIENT_ID and CLIENT_SECRET; OAuth 2.0 authorization flow must be completed before API calls can be made.
- Low install friction with only requests as a runtime dependency.
- Package is dormant (858 days since last release), so no active maintenance or bug fixes should be expected, though it supports current Python versions (3.7–3.12).
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions, requiring only attribution and inclusion of the license notice.
last release 2024-04-08 (858 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 98,113 downloads/mo, #13,107 on PyPI
Alternatives
Verify before relying
pip install microsoftgraph-python
from microsoftgraph.client import Client
client = Client('CLIENT_ID', 'CLIENT_SECRET')
url = client.authorization_url(redirect_uri, scope)
response = client.users.get_me()- Whether the package's v1.0.0+ API changes are fully backward-compatible or if migration from earlier versions requires code rewrites.
- Current state of the Microsoft Graph API endpoints the wrapper targets—whether they remain stable or have undergone breaking changes since the last release.
- Whether auto-pagination (enabled by default) works correctly for all endpoint types or has known limitations.
What it is and what it does
microsoftgraph-python is a Python client library that wraps the Microsoft Graph REST API, handling OAuth 2.0 authentication and providing a structured object-oriented interface to Microsoft 365 services. It abstracts away the complexity of direct HTTP calls to Graph endpoints, offering methods to interact with mail, calendar, contacts, files (OneDrive), OneNote, and Excel workbooks on behalf of authenticated users.
The library returns Response objects (wrapping the underlying requests library response) with `.data` attributes containing parsed API results, supports automatic pagination of large result sets, and allows injection of custom request hooks for logging or middleware. It targets v1.0 Graph endpoints by default but can be configured to use beta endpoints. However, the package has been dormant for over two years, so it may lag behind Microsoft's API evolution or security updates.
Use it for
- Build a Python application that reads and sends emails, manages calendar events, or accesses contacts on behalf of a user via OAuth 2.0.
- Automate file operations (upload, download, search) in a user's OneDrive or SharePoint via the Graph API without direct SDK dependencies.
- Create or update Excel workbooks and worksheets programmatically through Graph's workbook session management.
- Integrate Microsoft 365 data (mail, calendar, contacts) into a custom dashboard or reporting tool.
- Log all Graph API requests to a database or monitoring system using the requests_hooks parameter.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need a lightweight Python wrapper for Microsoft Graph and can accept dormant maintenance.
The low install friction (only requests dependency), MIT license, and broad API coverage make it suitable for straightforward Graph integration. However, verify that the endpoints you need are stable and that the package's v1.0.0+ breaking changes align with your use case; consider monitoring for security updates independently since active maintenance has stalled.
Install
microsoftgraph-python on PyPI
Before you install
Low install friction with only requests as a runtime dependency. Package is dormant (858 days since last release), so no active maintenance or bug fixes should be expected, though it supports current Python versions (3.7–3.12).
Requires a Microsoft Azure app registration with CLIENT_ID and CLIENT_SECRET; OAuth 2.0 authorization flow must be completed before API calls can be made.
License in practice
MIT license permits commercial and private use with minimal restrictions, requiring only attribution and inclusion of the license notice.
Quickstart
pip install microsoftgraph-python
from microsoftgraph.client import Client
client = Client('CLIENT_ID', 'CLIENT_SECRET')
url = client.authorization_url(redirect_uri, scope)
response = client.users.get_me()
Verify before relying
- Whether the package's v1.0.0+ API changes are fully backward-compatible or if migration from earlier versions requires code rewrites.
- Current state of the Microsoft Graph API endpoints the wrapper targets—whether they remain stable or have undergone breaking changes since the last release.
- Whether auto-pagination (enabled by default) works correctly for all endpoint types or has known limitations.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0,>=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagerequests |
| Maintenance | Dormant 858 days since the last release |
| First released | |
| Downloads | 98,113 / month, #13,107 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: microsoftgraph_python-1.1.8.1-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 › “oauth 2.0 microsoft authentication”
- microsoftgraph-pythonA Python wrapper for the Microsoft Graph API that handles OAuth 2.0…
- rauthRauth provides OAuth 1.0/a and OAuth 2.0 consumer support for Python…
- aioauthaioauth implements the OAuth 2.0 protocol for use with asynchronous…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP 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.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also o365 · office365-rest-python-client · PyCronofy · exchangelib · office365 · dynamics365crm-python · requests-oauth2client · msgraphfs · msgraph-sdk · oauth2-client