Here you can find a program I made to send data to my Azure IoT Hub via HTTPS using SIMCOM Modules (SIM800, SIM900...): https://developer.mbed.org/users/BorjaTarazona/code/Azure_SIM800_HelloWorld/
I had the same issue, my problem was that you need to write before your shared access signature "Authorization: ". You need to use the argument "USERDATA" and the command will look like this:
AT+HTTPPARA="USERDATA","Authorization: YourSharedAccessSignature"\r\n
The commands I use to send data to Azure via HTTPS with SIMCOM modules are:
Initialization
Set context type: AT+SAPBR=3,1,"CONTYPE","GPRS"\r\n
Set APN: AT+SAPBR=3,1,"APN","YourAPN"\r\n
- Open bearer:
AT+SAPBR=1,1\r\n
- Query bearer:
AT+SAPBR=2,1\r\n
- Enable HTTP functions:
AT+HTTPINIT\r\n
- Enable SSL:
AT+HTTPSSL=1\r\n
Data transmission
- Set bearer profile identifier:
AT+HTTPPARA="CID",1\r\n
- Set the URL:
AT+HTTPPARA="URL","YourURL"\r\n
- Set the shared access signature:
AT+HTTPPARA="USERDATA","Authorization: YourSharedAccessSignature"\r\n
- Set Content-Type field in the HTTP header:
AT+HTTPPARA="CONTENT","application/json"\r\n
- Set the JSON string to be sent:
AT+HTTPDATA=StringLength,20000\r\nYourJSONString
- HTTP POST:
AT+HTTPACTION=1\r\n