Skip to content

Azure/Connectors-NET-Samples

Azure Connectors .NET SDK — Samples

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.

What's Inside

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

Key Patterns Demonstrated

  • DI-based lifetime — connector clients registered as singletons, disposed by the host
  • Managed IdentityDefaultAzureCredential, system-assigned, or user-assigned MSI
  • Paginationawait foreach over ConnectorPageable for auto-paged results
  • Binary contentbyte[] 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

Quick Start

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 start

For connector setup (creating connections, OAuth consent, access policies), see the connection-setup skill in the SDK repo.

Related Repositories

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

Contributing

This project welcomes contributions and suggestions. See CONTRIBUTING.md for details.

License

MIT

About

Sample Azure Functions applications demonstrating Azure Connectors .NET SDK usage with various connectors (Office 365, SharePoint, Teams, etc.). Provides getting-started references, E2E validation targets for generated connector clients, and integration test bed for connection setup flows.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages