Type-safe Python clients for Azure connectors β call Office 365, SharePoint, Teams, Dataverse, and 1,000+ connectors directly from Azure Functions and other Python apps.
Caution
Early Preview β Not for Production Use
This SDK is currently in early preview and is under active development. It is intended for evaluation, experimentation, and feedback purposes only.
- Do not use this SDK in production environments.
- Breaking changes should be expected across APIs, data models, and behavior in future releases.
- Features may be added, modified, or removed without prior notice.
We welcome feedback and contributions β please open an issue with questions, suggestions, or bug reports.
Azure provides a rich ecosystem of managed connectors that bridge your code to SaaS services, PaaS resources, and on-premises systems. Originally powering Azure Logic Apps and Power Automate, these connectors are now available as standalone, strongly-typed Python clients for any Python application β no workflow service required.
- Async/await native β Built on
aiohttpwith full async support for modern Python applications - Type-safe operations β Generated async methods with type hints and comprehensive docstrings
- Built-in authentication β Managed identity, Azure Identity, and API key token providers
- Resilient HTTP β Configurable retry policies with exponential backoff for transient failures
- 1,000+ connectors β Any Azure managed connector available via API Hub can be generated
Note: This is the Python SDK. A .NET SDK is also available. Node.js and Java SDKs are planned in collaboration with the Azure Functions team.
βββββββββββββββββββββββββββββββββββββββ
β Your Azure Function / Python App β
β β
β async with Office365Client(...): β
β await client.send_email(...) β
ββββββββββββββββ¬βββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββ
β Generated Connector Clients β
β (office365.py, teams.py, etc.) β
β β
β β’ Typed async methods per action β
β β’ Dataclass models from Swagger β
β β’ Docstrings from connector meta β
ββββββββββββββββ¬βββββββββββββββββββββββ
β depends on
βΌ
βββββββββββββββββββββββββββββββββββββββ
β Azure Connectors Python SDK β
β azure.connectors.sdk β
β β
β β’ ManagedIdentityTokenProvider β
β β’ ConnectorHttpClient + retry β
β β’ ConnectorClientBase β
βββββββββββββββββββββββββββββββββββββββ
Install from PyPI:
pip install azure-connectorsOr install with development dependencies:
pip install azure-connectors[dev]import asyncio
from azure.connectors.office365 import Office365Client
from azure.connectors.sdk import ManagedIdentityTokenProvider
async def send_email_example():
# Connection runtime URL from Azure Portal
connection_url = "https://example.azure.com/connections/office365"
# Use managed identity for authentication
token_provider = ManagedIdentityTokenProvider()
# Create client and send email
async with Office365Client(connection_url, token_provider) as client:
await client.send_email_v2_async(
to="recipient@example.com",
subject="Hello from Python SDK",
body="<p>This email was sent using the Azure Connectors Python SDK!</p>",
from_address="sender@example.com"
)
print("Email sent successfully!")
# Run the async function
asyncio.run(send_email_example())from azure.connectors.sharepointonline import SharepointonlineClient
async def list_sharepoint_items():
connection_url = "https://example.azure.com/connections/sharepointonline"
async with SharepointonlineClient(connection_url) as client:
# Get all items from a SharePoint list
items = await client.get_items_async(
dataset="https://contoso.sharepoint.com/sites/MySite",
table="MyList"
)
for item in items.get("value", []):
print(f"Item: {item.get('Title')}")
asyncio.run(list_sharepoint_items())from azure.connectors.teams import TeamsClient
async def post_teams_message():
connection_url = "https://example.azure.com/connections/teams"
async with TeamsClient(connection_url) as client:
await client.post_message_to_conversation_async(
group_id="team-group-id",
channel_id="19:channel-id",
body_content="Hello from Python!",
body_content_type="text"
)
print("Message posted to Teams!")
asyncio.run(post_teams_message())The following connectors have been generated and validated with comprehensive test coverage:
| Connector | Package | Status | Coverage | Tests |
|---|---|---|---|---|
| ARM (Azure Resource Manager) | azure.connectors.arm |
β Complete | π SDK Generated | 39 tests |
| Azure Automation | azure.connectors.azureautomation |
β Complete | π SDK Generated | 32 tests |
| Azure AD | azure.connectors.azuread |
β Complete | π SDK Generated | 35 tests |
| Azure Blob Storage | azure.connectors.azureblob |
β Complete | β E2E Validated | 52 tests |
| Azure Cosmos DB | azure.connectors.documentdb |
β Complete | π SDK Generated | 46 tests |
| Azure Data Factory | azure.connectors.azuredatafactory |
β Complete | π SDK Generated | 38 tests |
| Azure Digital Twins | azure.connectors.azuredigitaltwins |
β Complete | π SDK Generated | 44 tests |
| Azure Data Explorer | azure.connectors.kusto |
β Complete | β E2E Validated | 37 tests |
| Azure Event Hubs | azure.connectors.eventhubs |
β Complete | π SDK Generated | 30 tests |
| Azure Key Vault | azure.connectors.keyvault |
β Complete | π SDK Generated | 42 tests |
| Azure Queues | azure.connectors.azurequeues |
β Complete | π SDK Generated | 34 tests |
| Azure Tables | azure.connectors.azuretables |
β Complete | π SDK Generated | 43 tests |
| Azure VM | azure.connectors.azurevm |
β Complete | π SDK Generated | 43 tests |
| Excel Online (Business) | azure.connectors.excelonlinebusiness |
β Complete | π SDK Generated | 37 tests |
| IBM MQ | azure.connectors.mq |
β Complete | β E2E Validated | 30 tests |
| Microsoft Bookings | azure.connectors.microsoftbookings |
β Complete | π SDK Generated | 36 tests |
| Microsoft Dataverse | azure.connectors.commondataservice |
β Complete | π SDK Generated | 46 tests |
| Microsoft Defender ATP | azure.connectors.wdatp |
β Complete | π SDK Generated | 32 tests |
| Microsoft Graph | azure.connectors.msgraphgroupsanduser |
β Complete | β E2E Validated | 46 tests |
| Microsoft Teams | azure.connectors.teams |
β Complete | β E2E Validated | 27 tests |
| Office 365 Outlook | azure.connectors.office365 |
β Complete | β E2E Validated | 41 tests |
| Office 365 Users | azure.connectors.office365users |
β Complete | β E2E Validated | 40 tests |
| Office 365 Groups | azure.connectors.office365groups |
β Complete | π SDK Generated | 50 tests |
| OneDrive for Business | azure.connectors.onedrive |
β Complete | π SDK Generated | 41 tests |
| OneNote | azure.connectors.onenote |
β Complete | π SDK Generated | 60 tests |
| Outlook.com | azure.connectors.outlook |
β Complete | π SDK Generated | 42 tests |
| Planner | azure.connectors.planner |
β Complete | π SDK Generated | 66 tests |
| Service Bus | azure.connectors.servicebus |
β Complete | π SDK Generated | 37 tests |
| SharePoint Online | azure.connectors.sharepointonline |
β Complete | β E2E Validated | 44 tests |
| SMTP | azure.connectors.smtp |
β Complete | π SDK Generated | 27 tests |
| Word Online (Business) | azure.connectors.wordonlinebusiness |
β Complete | π SDK Generated | 30 tests |
| Yammer | azure.connectors.yammer |
β Complete | π SDK Generated | 38 tests |
Total: 685 connector tests + 110 SDK component tests
See ROADMAP.md for planned connector additions and tests/README.md for detailed test coverage.
The SDK supports multiple authentication methods:
from azure.connectors.sdk import ManagedIdentityTokenProvider
# System-assigned managed identity
token_provider = ManagedIdentityTokenProvider()
# User-assigned managed identity
token_provider = ManagedIdentityTokenProvider(client_id="your-client-id")from azure.identity.aio import DefaultAzureCredential
from azure.connectors.office365 import Office365Client
# Use any Azure Identity credential directly
credential = DefaultAzureCredential()
client = Office365Client(connection_url, credential)from azure.connectors.sdk import ConnectionStringTokenProvider
token_provider = ConnectionStringTokenProvider("your-api-key")Customize client behavior with ConnectorClientOptions:
from azure.connectors.sdk import ConnectorClientOptions
options = ConnectorClientOptions(
timeout_seconds=60.0, # Request timeout
max_retry_attempts=5, # Max retry count
use_exponential_backoff=True, # Exponential backoff
initial_retry_delay_seconds=1.0 # Initial retry delay
)
client = Office365Client(connection_url, token_provider, options)azure-connectors/
βββ src/azure/connectors/
β βββ sdk/ # Core SDK infrastructure
β β βββ authentication.py # Token providers
β β βββ client_base.py # Base connector client
β β βββ http_client.py # HTTP client with retry
β β βββ options.py # Configuration options
β β βββ exceptions.py # Exception types
β βββ office365.py # Office 365 generated client
β βββ sharepointonline.py # SharePoint generated client
β βββ teams.py # Teams generated client
β βββ kusto.py # Kusto generated client
β βββ msgraph.py # MS Graph generated client
βββ tests/ # Comprehensive test suite
βββ samples/ # Usage examples
βββ docs/ # Additional documentation
The SDK supports SDK-type bindings for Python Function apps, allowing functions to bind to and return rich, strongly-typed objects instead of raw JSON payloads. This enables cleaner code and better IDE support with type hints.
Use the from_json class method to convert JSON payloads into typed objects:
from azure.connectors.office365 import ClientReceiveMessage
# Parse JSON payload into a list of typed email message objects
messages = ClientReceiveMessage.from_json(payload)
for message in messages:
print(f"From: {message.from_}")
print(f"Subject: {message.subject}")
print(f"Importance: {message.importance}") # 0=Low, 1=Normal, 2=HighThe from_json method handles:
- JSON string or dictionary input
- Nested
body.valuepayload structure - Field name conversion (camelCase β snake_case)
- Type conversion (e.g., importance string β int)
- Attachment parsing
Note: The
from_jsonmethod is not auto-generated by the SDK code generator. See docs/sdk-type-bindings.md for implementation details and how to add support for new types.
This feature is particularly useful when building Azure Functions that process connector webhook payloads or trigger data.
- Azure Functions Connector Extension - An Azure Functions trigger extension for receiving webhook callbacks from Connector Namespace managed connectors
- Connectors .NET SDK β .NET implementation of this SDK
- Connectors Node.js SDK β Node.js implementation of this SDK
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot.
See CONTRIBUTING.md for detailed guidelines.
For issues and questions:
- π Bug reports: File an issue
- π Documentation: See docs/ folder
See SUPPORT.md for more information.
This project is licensed under the MIT License - see the LICENSE file for details.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.