--- id: dynamics365crm-python version: "1.0.2" license: MIT license_treatment: permissive maintenance: abandoned --- # dynamics365crm-python — API wrapper for Dynamics365CRM written in Python License: permissive · Maintenance: abandoned · Downloads: 79.7K/mo ## What it is and what it does dynamics365crm-python is a wrapper around the Microsoft Dynamics 365 CRM Web API that lets you interact with CRM records from Python code. It handles OAuth2 authentication against Azure AD and provides a client object with methods to query, create, update, and delete contacts, accounts, opportunities, leads, and campaigns. The library depends on msal for authentication and requests for HTTP calls. The package supports both direct access-token authentication and the full OAuth2 code-exchange flow, including token refresh. It abstracts away the underlying REST API details, letting you work with CRM entities through simple method calls like get_contacts(), create_account(), and update_opportunity(). The library targets Dynamics 365 API version v9.0 and supports Python 3.7 through 3.11. Use it for: - Automate bulk contact or lead imports into Dynamics 365 from external data sources or ETL pipelines. - Build a backend service that syncs opportunity or campaign data between Dynamics 365 and another business system. - Create a Python script to query and export CRM records for reporting or analytics without manual portal access. - Integrate Dynamics 365 CRM data into a web application or bot that needs read/write access to accounts and contacts. - Develop a scheduled job that updates lead or campaign records based on external events or triggers. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a Python client for interacting with Microsoft Dynamics 365 CRM via its Web API, supporting OAuth2 authentication and CRUD operations on contacts, accounts, opportunities, leads, and campaigns. No—the project is abandoned and will receive no maintenance, bug fixes, or security patches. While the code may still work with current Dynamics 365 instances, you have no recourse if the API changes, dependencies break, or security issues emerge. For production use, seek an actively maintained alternative or consider building directly against the Dynamics 365 REST API. ## Install pip install dynamics365crm-python uv add dynamics365crm-python poetry add dynamics365crm-python ## Installing dynamics365crm-python Before you install: Installation is straightforward with low friction—the package depends only on msal and requests. However, the project is abandoned, meaning no bug fixes or security updates will be issued going forward. License in practice: Licensed under MIT (permissive), so you can use, modify, and distribute the package freely with minimal restrictions. Quickstart: pip install dynamics365crm-python from dynamics365crm.client import Client client = Client( "https://tenant_name.crmX.dynamics.com", client_id="CLIENT_ID", client_secret="CLIENT_SECRET" ) contacts = client.get_contacts() Requires Azure AD application credentials (client_id and client_secret) and a valid Dynamics 365 tenant domain to authenticate and connect. Verify before relying: - Whether the package remains compatible with current Dynamics 365 API versions beyond v9.0 or if breaking changes have occurred. - Current state of msal and requests dependencies—whether they have introduced breaking changes since the last release. - Whether the OAuth2 flow implementation still aligns with current Microsoft Azure AD authentication best practices. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 79.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags dynamics 365 crm api client, microsoft dynamics 365 python, crm contact management api, dynamics 365 oauth2 authentication, crm web api wrapper, dynamics 365 lead and opportunity management, azure ad crm integration, crm-integration, microsoft-dynamics, oauth2 [View on SkillFed](https://skillfed.io/packages/dynamics365crm-python) · [View on PyPI](https://pypi.org/project/dynamics365crm-python/)