SAS provisioning with c embedded SDK MQTT not connecting

Avigdor 0 Reputation points
2024-04-01T09:41:54.72+00:00

Hello,

I'm using the embedded c SDK and i'm trying to provision a device I created in IoT central with SAS.

the key and signature seem to be created successfully.

I'm getting URL: global.azure-devices-provisioning.net
user name: xxx/registrations/xxx/api-version=2019-03-31

password: SharedAccessSignature sr=xxx%2fregistrations%2fxxx&sig=xxx%3D&se=1711970568.

the MQTT seems to simply not connect, am i missing someghing?

I'm using TLS without server authentication, if i need the server authentication where do i get the certificate?

Azure IoT SDK
Azure IoT SDK
An Azure software development kit that facilitates building applications that connect to Azure IoT services.
208 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 27,491 Reputation points
    2024-04-01T13:17:37.4466667+00:00

    Avigdor Greetings!

    Can you share more details about the error?

    Did you check this TLS/SSL configuration?

    If the SAS token is correct, then it's possible that there is an issue with the MQTT connection. You can try enabling logging in the SDK to see if there are any error messages that can help you diagnose the issue.

    Regarding your question about server authentication, if you are using TLS without server authentication, you don't need a server certificate. If you want to use server authentication, you can obtain the server certificate. You can find more information on how to obtain the server certificate in the Communicate with an IoT hub using the MQTT protocol.

    Do let me know if that helps or have any further queries.

    0 comments No comments