I want to retrieve our on-premise Portal or AGOL users based on a query on the lastLogin, for example the users who last logins between two dates, or since a date, or in the last 2 hours, How would I do that? Also I want to sort the results based on lastLogin using the below statement, it does not sort as expected.
users = gis.users.search("*",sort_field="lastLogin",sort_order="desc",max_users=1000).