An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
Hello @SDK for Embedded C IoT Hub Samples on Windows ,
you want to give certain users access to certain devices.
This means you have to have a mapping at some point between a user and a device.
So, if an IoT message arrives, you want to execute some logic that makes the decision on what to do with that message (eg. sending the message to a certain Websocket/SignalR client/etc.).
There are a number of ways to do this (it also depends on how you communicate with devices) but here are a number of ways to do this:
- just create a database table (eg. in CosmosDB or SqlAzure) or Azure Storage Table and check this every time a message arrives
- Use a Stream Analytics Job and join the mapping as reference data and output to the logic which sends the data
- Make use of a tag in the Azure IoT device twin and enrich incoming messages with that tag while routing to the logic (eg. an Azure function having the IoT Hub trigger)
These first two need more Azure resources but managing the tables is much more easy.
The third solution is simple but you need to have knowledge about the Device Twin and how to manipulate it.