A cloud-based identity and access management service for securing user authentication and resource access
If you make use of the IoT Hub Rest API, take a look at https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-security#security-tokens where the creation of a security token is shown.
There is an example shown in javascript.
With that token, you could do something like:
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", token);
var body = "[some json structure]";
var stringContent = new StringContent(body, Encoding.UTF8, "application/json");
var restUriPost = $"https://{iotHubName}/[some method]";
using var resultPost = client.PostAsync(restUriPost, [stringContent of body]).Result;
return resultPost.StatusCode.ToString();
This works in any programming language which is capable to some basic security stuff and HTTPS calls.
Due to the usage of an IoT hub connection string, please do not distribute that connection string to devices, just use it in cloud resources using a key vault.