msgraph-sdk
The Microsoft Graph Python SDK
Decision gist · record as of 2026-08-14
Yes. This is the official Microsoft Graph Python client, actively maintained with no known vulnerabilities and low install friction. Use it if you need to call Microsoft Graph APIs from Python—it's the standard choice for Microsoft service integration. The async-first design and comprehensive API coverage make it suitable for both simple scripts and production services, though you'll need to understand async/await patterns and have credentials ready.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Requires Azure AD application registration and credentials.
- SDK is async-first; sync usage requires wrapping in asyncio or similar.
License · maintenance · safety
MIT (permissive) — MIT license (permissive): you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2026-08-05 (9 days) · last repo commit 2026-08-08 · 625 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 8,118,879 downloads/mo, #1,663 on PyPI
Alternatives
Verify before relying
pip install msgraph-sdk
from azure.identity.aio import ClientSecretCredential
from msgraph import GraphServiceClient
credential = ClientSecretCredential('tenant_id', 'client_id', 'client_secret')
client = GraphServiceClient(credentials=credential, scopes=['https://graph.microsoft.com/.default'])
user = await client.users.by_user_id('user_id').get()- Whether the package includes offline caching or request batching beyond what msgraph_core provides.
- Performance characteristics when handling large result sets or concurrent requests.
- Completeness of v1.0 API coverage relative to the full Microsoft Graph surface.
What it is and what it does
The Microsoft Graph SDK for Python is an official client library that wraps the Microsoft Graph REST API, allowing Python applications to authenticate and call Microsoft services. It handles credential management through azure-identity, request serialization via kiota serialization libraries, and provides a fluent object model that mirrors the REST API structure. The SDK is async-first by design, using asyncio as its primary concurrency model, though it can be integrated into sync code.
You use it by registering an application, selecting an authentication credential type (ClientSecretCredential for daemon apps, DeviceCodeCredential or InteractiveBrowserCredential for user-interactive flows), creating a GraphServiceClient, and then calling methods on its fluent API to read and write data. The library handles HTTP transport, error handling, and response deserialization automatically.
Use it for
- Build daemon applications that read or modify user data, calendar events, or team information without user interaction.
- Integrate Microsoft services data into custom Python applications or workflows.
- Automate administrative tasks like user provisioning, group management, or license assignment.
- Create Python-based bots or background services that interact with Microsoft Graph on a schedule.
- Fetch user profile, presence, or organizational hierarchy data for identity and access control decisions.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is the official Microsoft Graph Python client, actively maintained with no known vulnerabilities and low install friction. Use it if you need to call Microsoft Graph APIs from Python—it's the standard choice for Microsoft service integration. The async-first design and comprehensive API coverage make it suitable for both simple scripts and production services, though you'll need to understand async/await patterns and have credentials ready.
Install
msgraph-sdk on PyPI
Before you install
Low friction: pure Python wheel with 6 runtime dependencies. Active maintenance with a release 9 days ago; repo shows recent commits and 625 stars. Supports Python 3.10 through 3.14.
Requires Python 3.10 or later. Requires Azure AD application registration and credentials. SDK is async-first; sync usage requires wrapping in asyncio or similar.
License in practice
MIT license (permissive): you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install msgraph-sdk
from azure.identity.aio import ClientSecretCredential
from msgraph import GraphServiceClient
credential = ClientSecretCredential('tenant_id', 'client_id', 'client_secret')
client = GraphServiceClient(credentials=credential, scopes=['https://graph.microsoft.com/.default'])
user = await client.users.by_user_id('user_id').get()
Verify before relying
- Whether the package includes offline caching or request batching beyond what msgraph_core provides.
- Performance characteristics when handling large result sets or concurrent requests.
- Completeness of v1.0 API coverage relative to the full Microsoft Graph surface.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesazure-identitymicrosoft-kiota-serialization-jsonmicrosoft-kiota-serialization-textmicrosoft-kiota-serialization-formmicrosoft-kiota-serialization-multipartmsgraph_core |
| Maintenance | Actively maintained 9 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 8,118,879 / month, #1,663 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: msgraph_sdk-1.61.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 › “microsoft graph rest client”
- msgraph-sdkPython client library for calling Microsoft Graph APIs with…
- office365-rest-python-clientPython client library for Microsoft 365 and Microsoft Graph APIs,…
- microsoftgraph-pythonA Python wrapper for the Microsoft Graph API that handles OAuth 2.0…
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 msgraph-beta-sdk · office365-rest-python-client · msgraphfs · msgraph-core · azure-identity · azure-mgmt-msi · azure-batch · azure-kusto-data · azure-cosmos · dotnetcore2