BZ-1060230 - Tasks don't work on EWS configured with JAASUserGroupCallback

(cherry picked from commit c7e7891c9484d2f8ae8e95f473e09f452d23fab3)