# Device identity change after reflash

**URL:** <https://hub.mender.io/t/device-identity-change-after-reflash/6312>\
**Category:** General Discussions\
**Tags:** identity\
**Created:** [November 1, 2023, 5:22pm UTC](https://hub.mender.io/t/device-identity-change-after-reflash/6312 "2023-11-01T17:22:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sd-ricardo](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/sd-ricardo/32/1910_2.png) [@sd-ricardo](https://hub.mender.io/u/sd-ricardo)\
**Post date:** [November 1, 2023, 5:22pm UTC](https://hub.mender.io/t/device-identity-change-after-reflash/6312/1 "2023-11-01T17:22:27Z")

</div>

Haven’t you noticed that after re-flashing the device with the same image, the device-id assigned by mender changes?  
I also have my custom identity script that is based on the cpu\_id, however if I re-flash the device I got a different device id and the device needs to be accepted again. Does it also happen to you?

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [November 2, 2023, 8:06am UTC](https://hub.mender.io/t/device-identity-change-after-reflash/6312/2 "2023-11-02T08:06:51Z")

</div>

Hi @sd-ricardo,

The behaviour should be like this:

- once the device is re-flashed, it obviously has no access to its certificate anymore
- it needs to be re-authenticated
- if the device identity provider has not changed (e.g. MAC adress, cpu\_id, or whatever you used) then it should be recognized as the same device.

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![sd-ricardo](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/sd-ricardo/32/1910_2.png) [@sd-ricardo](https://hub.mender.io/u/sd-ricardo)\
**Post date:** [November 2, 2023, 11:43am UTC](https://hub.mender.io/t/device-identity-change-after-reflash/6312/3 "2023-11-02T11:43:04Z")

</div>

thanks for the detailed explanation!  
The problem was I was updating the certificate.

So in case the certificate expires all devices needs to be re-registered?
