# \[Feature Request\] Mender CLI, using primary ID selected in Mender Settings

**URL:** <https://hub.mender.io/t/feature-request-mender-cli-using-primary-id-selected-in-mender-settings/7587>\
**Category:** General Discussions\
**Tags:** feature-request, mender-cli\
**Created:** [February 20, 2025, 10:17am UTC](https://hub.mender.io/t/feature-request-mender-cli-using-primary-id-selected-in-mender-settings/7587 "2025-02-20T10:17:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marvinosswald](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marvinosswald/32/2427_2.png) [@marvinosswald](https://hub.mender.io/u/marvinosswald)\
**Post date:** [February 20, 2025, 10:17am UTC](https://hub.mender.io/t/feature-request-mender-cli-using-primary-id-selected-in-mender-settings/7587/1 "2025-02-20T10:17:38Z")

</div>

Hi all,  
we are using a property ID as the leading Identifier for our devices. We have set the UI to use it as the leading identifier which works nicely. For everything but `mender-cli` because there we can only use the mender generated internal ID which we now have to access through going into the UI and copy it from the url, it’s not shown anywhere else.

Could we have this integrated in the cli as well ? So we can either just access device by the leading id selected in the UI or like `mender terminal ID=abc` ?

---

<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:** [February 20, 2025, 3:59pm UTC](https://hub.mender.io/t/feature-request-mender-cli-using-primary-id-selected-in-mender-settings/7587/2 "2025-02-20T15:59:42Z")

</div>

Hi @marvinosswald,

Thanks for reaching out. The good news is, it could definitely be integrated. Basically you’d need to automatically get the internal ID by API first ([Mender API docs](https://docs.mender.io/api/#management-api-device-authentication-list-devices)), and then use that. The bad news is, its not exactly a priority for the dev team… PRs welcome 😃

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![marvinosswald](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marvinosswald/32/2427_2.png) [@marvinosswald](https://hub.mender.io/u/marvinosswald)\
**Post date:** [April 3, 2025, 1:02pm UTC](https://hub.mender.io/t/feature-request-mender-cli-using-primary-id-selected-in-mender-settings/7587/4 "2025-04-03T13:02:29Z")

</div>

Hi Josef,  
glad to hear this. I did open a PR for it: [feat: Add --select Flag to terminal and port-forward to select devices by any available attribute by marvinosswald · Pull Request #275 · mendersoftware/mender-cli · GitHub](https://github.com/mendersoftware/mender-cli/pull/275)

Cheers,  
Marvin
