Well normal sorting of your list is easy with a database retrieve in a microflow: https://docs.mendix.com/refguide/retrieve
You can just use the sort option and sort the list on for example the name of the users.
If you have multiple records with the same name in the list however, and you want you show each username only once you would have to do some form of list actions depending on what your exact use case is.
For example create a new list, start a loop and iterate over your retrieved list.
Check everytime if there is a record with the username of the iterator
If not, add the iterator object to the list
If yes, dont add the record for the list