added method to retrieve environment from portal