# How can I get a list of all preauthorized devices (with mac addresses) using mender APIs?

**URL:** https://hub.mender.io/t/how-can-i-get-a-list-of-all-preauthorized-devices-with-mac-addresses-using-mender-apis/1415
**Category:** General Discussions
**Created:** [January 9, 2020, 9:26am UTC](https://hub.mender.io/t/how-can-i-get-a-list-of-all-preauthorized-devices-with-mac-addresses-using-mender-apis/1415 "2020-01-09T09:26:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ks89](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ks89/32/86_2.png) [@Ks89](https://hub.mender.io/u/Ks89)
#### Post date: [January 9, 2020, 9:26am UTC](https://hub.mender.io/t/how-can-i-get-a-list-of-all-preauthorized-devices-with-mac-addresses-using-mender-apis/1415/1 "2020-01-09T09:26:42Z")

</div>

Hi!  
Which is the best way to list all preauthorized devices on mender server using management apis?

I only need an array of mac addresses.

Thank you.

---

<div class="post-metadata">

### Author: ![Ks89](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ks89/32/86_2.png) [@Ks89](https://hub.mender.io/u/Ks89)
#### Post date: [January 9, 2020, 9:34am UTC](https://hub.mender.io/t/how-can-i-get-a-list-of-all-preauthorized-devices-with-mac-addresses-using-mender-apis/1415/2 "2020-01-09T09:34:17Z")

</div>

At the moment the quickest way that I found is to list all devices taking only status “preauthorized”.  
Is it correct? Or do you have another solution?

thanks

---

<div class="post-metadata">

### Author: ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)
#### Post date: [January 9, 2020, 1:34pm UTC](https://hub.mender.io/t/how-can-i-get-a-list-of-all-preauthorized-devices-with-mac-addresses-using-mender-apis/1415/3 "2020-01-09T13:34:13Z")

</div>

HI @Ks89 yes that is the best mechanism. Are you missing something here that you need?  
Drew

---

<div class="post-metadata">

### Author: ![Ks89](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ks89/32/86_2.png) [@Ks89](https://hub.mender.io/u/Ks89)
#### Post date: [January 9, 2020, 3:57pm UTC](https://hub.mender.io/t/how-can-i-get-a-list-of-all-preauthorized-devices-with-mac-addresses-using-mender-apis/1415/4 "2020-01-09T15:57:33Z")

</div>

Ok, thank you for the confirmation
