Sample Azure Functions demonstrating the Azure Connectors .NET SDK — calling managed connectors directly from Azure Functions.
Caution
Early Preview — Not for Production Use
These samples use the Azure Connectors .NET SDK, which is currently in early preview and under active development. They are intended for evaluation, experimentation, and feedback purposes only.
- Do not use in production environments.
- Breaking changes should be expected across the SDK's APIs, data models, and behavior in future releases, which may require updates to these samples.
- 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.
The DirectConnector/ project is an Azure Functions (isolated worker) app with sample functions across 11 connectors. Newer connectors have dedicated Functions classes; the original three (Office 365, SharePoint, Teams) share ConnectorFunctions.cs:
| File | Connector | Sample Operations |
|---|---|---|
| ConnectorFunctions.cs | Office 365 (Mail/Calendar) | Send email, get categories, export email, create calendar event, trigger callbacks |
| ConnectorFunctions.cs | SharePoint Online | List libraries, browse folders, download/upload files |
| ConnectorFunctions.cs | Microsoft Teams | List teams/channels, get messages, post messages |
| MsGraphFunctions.cs | MS Graph Groups & Users | List users, search groups, get group properties |
| OneDriveFunctions.cs | OneDrive for Business | Browse folders, download/upload files, search, share links |
| Office365UsersFunctions.cs | Office 365 Users | Get my profile, user lookup, manager/reports chain, search users |
| MqFunctions.cs | IBM MQ | Send, browse, receive, delete messages |
| SmtpFunctions.cs | SMTP | Send email via SMTP |
| AzureBlobFunctions.cs | Azure Blob Storage | Upload, download, get metadata, delete blobs |
| AzureLogAnalyticsFunctions.cs | Azure Monitor Logs | List subscriptions, list resources |
| ArmFunctions.cs | Azure Resource Manager (ARM) | List subscriptions, resource groups, read resources |
- DI-based lifetime — connector clients registered as singletons, disposed by the host
- Managed Identity —
DefaultAzureCredential, system-assigned, or user-assigned MSI - Pagination —
await foreachoverConnectorPageablefor auto-paged results - Binary content —
byte[]download/upload for files and email export - Error handling — connector-specific exceptions surfaced as 502 with structured JSON, generic
IsFatal()fallback - Trigger callbacks — typed deserialization of Connector Gateway payloads
git clone https://github.com/Azure/Connectors-NET-Samples.git
cd Connectors-NET-Samples/DirectConnector
copy local.settings.json.template local.settings.json # Windows
# cp local.settings.json.template local.settings.json # macOS/Linux
# Edit local.settings.json with your connection runtime URLs
dotnet build
func startFor connector setup (creating connections, OAuth consent, access policies), see the connection-setup skill in the SDK repo.
| Repository | Description |
|---|---|
| Azure/Connectors-NET-SDK | The SDK package — generated connector clients and core abstractions |
| Azure/Connectors-NET-LSP | Language Server Protocol server and VS Code extension for SDK IntelliSense |
This project welcomes contributions and suggestions. See CONTRIBUTING.md for details.