CDB-4428 partially fixed the get_authenticated_users logic