We have a IoTHub trigger function, which will be triggered when data will be received in IoT hub and it will push the data to Cosmos DB.
How we can use managed identity instead of connection string to connect to IoT Hub.
A Connection string must a constant variable, we are not able to add connection string at runtime. Please let me know can we resolve this?
[FunctionName("FunctionName")]
public async Task RunAsync([IoTHubTrigger("messages/events", Connection = "IoTHubConnectionString")] EventData message, [CosmosDB( databaseName: "%DatabaseName%", containerName: "%ContainerName%", Connection = "DBConnection")] IAsyncCollector<object> RawDataContainer, ILogger log)