Azure IoT Hub bindings for Azure Functions

This set of articles explains how to work with Azure Functions bindings for IoT Hub. The IoT Hub support is based on the Azure Event Hubs Binding.

Important

While the following code samples use the Event Hub API, the given syntax is applicable for IoT Hub functions.

Action Type
Respond to events sent to an IoT hub event stream. Trigger
Write events to an IoT event stream Output binding

Add to your Functions app

Functions 2.x and higher

Working with the trigger and bindings requires that you reference the appropriate package. The NuGet package is used for .NET class libraries while the extension bundle is used for all other application types.

Language Add by... Remarks
C# Installing the NuGet package, version 3.x
C# Script, Java, JavaScript, Python, PowerShell Registering the extension bundle The Azure Tools extension is recommended to use with Visual Studio Code.
C# Script (online-only in Azure portal) Adding a binding To update existing binding extensions without having to republish your function app, see Update your extensions.

Functions 1.x

Functions 1.x apps automatically have a reference the Microsoft.Azure.WebJobs NuGet package, version 2.x.

Next steps