Sorting of devices


#1

@DuoKristina, Suppose a user has three devices added in duo. When I do an auth api request through the endpoint /auth/v2/preauth, in which order the devices are returned? Are those returned in the order they are showing up on the admin sdk? If the admin changes the order in the device list, will the returned list from the preauth endpoint call return the devices in that order? Is there any guarantee that the device that is in the top of the list on admin sdk will be in th etop of the list that authapi returns?


#2

Yes, the order is generally the same. Phone/push devices will always be returned in the same order. Tokens may not be, but you can’t auto token in path the way you can auto push or auto call, so the token order doesn’t really matter.

I encourage you to add multiple devices to a test user and explore the API results yourself.


#3

Would you guys be willing to mention this explicitly in your API documentation? Currently, the section on /preauth provides no hint that it is in fact an ordered list of devices.