question

RogerMahler-1128 avatar image
0 Votes"
RogerMahler-1128 asked ·

Azure Sphere Uniquely Identify a Device-How-to get the Device ID Programmatically

What is the best way to uniquely identify a device in Azure Sphere application - is there a device ID that can be pulled from the chipset or is there a better method?

I am trying to get the Device ID Programmatically so i can uniquely identify the device for processing data. the data is being sent over MQTT to our backend processing center (Outside Azure).

azure-sphere
· 5
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@RogerMahler-1128 Can you elaborate your query with more details to understand better?
Do you want to know the Azure Sphere DeviceID? An Azure Sphere device ID uniquely identifies an individual Azure Sphere chip. The device ID is stored on the device itself. All the other elements of a deployment are stored with the Azure Sphere Security Service.
To get details about the Azure Sphere device you can run the below command after logging into the Azure Sphere command prompt

azsphere device show-attached

66310-image.png

See azsphere command-line utility for more details.

If that's not what you are looking for, kindly provide more information and we would be happy to assist you accordingly.

0 Votes 0 ·
image.png (8.6 KiB)

Apologies (very badly worded question), I am trying to get the Device ID Programmatically so i can uniquely identify the device for processing data. the data is being sent over MQTT to our backend processing center (Outside Azure).

0 Votes 0 ·

@RogerMahler-1128 No worries, I have updated the Question & Title, so that the community readers can easily catch the point.

I am trying to get the Device ID Programmatically

I think you are asking for an API for your app to get the device ID at runtime ?.

If that is the case, then we don’t support this directly (as it encourages potentially insecure approaches). Instead, depending on your scenario, you may use the device ID in the device certificate when establishing a secure HTTPS or TLS connection.





0 Votes 0 ·
image.png (30.3 KiB)

@RogerMahler-1128 I have updated my response, as I understood the actual requirement of the scenario. Please feel free to comment in the below section, so that we help you further in this regard.

0 Votes 0 ·

Thank you for updating my title.

I was trying to get the ID at runtime from the device, not from the Azure Sphere HUB/Infrastructure - e.g. just before i send the json to the servers. I would be interested in understanding the comment "as it encourages potentially insecure approaches" comment, what security hole does it open?

in our deployment Azure Hub is only for managing secure FOTA, all data is sent to a corporate server for analysis and command/control.

if I understand Microsoft method is to reach out to the Sphere Hub at Microsoft for the device id, is this correct?

thank you.

0 Votes 0 ·
SatishBoddu-MSFT avatar image
0 Votes"
SatishBoddu-MSFT answered ·

Hello @RogerMahler-1128 Below is the response we have for your initial query. I hope this helps.

Instead, we can use the device ID in the device certificate when establishing a secure HTTPS or TLS connection.


Regarding the other question related to the security concern--> To be honest I don't have any information to share with you as of now. But we will keep you posted in the future for any further updates in this matter.

· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@RogerMahler-1128 If the response is helpful, please click "Accept Answer" and upvote it so that it is helpful to other community members as well and we can close this thread for now.

0 Votes 0 ·
RogerMahler-1128 avatar image
0 Votes"
RogerMahler-1128 answered ·

Thank you for updating my title.

I was trying to get the ID at runtime from the device, not from the Azure Sphere HUB/Infrastructure - e.g. just before i send the json to the servers. I would be interested in understanding the comment "as it encourages potentially insecure approaches" comment, what security hole does it open?

in our deployment Azure Hub is only for managing secure FOTA, all data is sent to a corporate server for analysis and command/control.

if I understand Microsoft method is to reach out to the Sphere Hub at Microsoft for the device id, is this correct?

thank you.

· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@RogerMahler-1128 Sorry I missed the notification on this post, let me check with my team on this and get back to you as soon as possible.

0 Votes 0 ·