Fixed bug with user impersonation and added List Endpoints method