Tasks for other users using EWS Java API
With the EWS JAVA API I can only create tasks for the signed in user and also the REST APIs don't support tasks. I couldn't find a way to create tasks for other users. Is there any way to create tasks for other users using EWS Java API?
I have seen one workaround over internet for EWS .net Managed API, "You would need to create the tasks in the "assigned" user's Task folder. That would require that the signed-in user have delegate access { Delegate access and EWS in Exchange : https://msdn.microsoft.com/EN-US/library/office/dn641957(v=exchg.150).aspx } to the assigned user's Task folder, or you'd need to consider using an app-only token to get access to all users' mailboxes. " , if this workaround works for java api , can you provide sample .
Thanks, Showkath.
Hi ,
I could able to solve problem by writing below code .
FolderId parentFolderId = null;
List<String> assignees = new ArrayList<String>();
assignees.add("[email protected]");
assignees.add("[email protected]");
assignees.add("[email protected]");
for (int index = 0; index < assignees.size(); index++) {
Mailbox mailbox = new Mailbox(assignees.get(index));
parentFolderId = new FolderId(WellKnownFolderName.Tasks, mailbox);
task.save(parentFolderId);
//To be verify - for each user - how is response
}
Hope this helps.
Regards, Showkath.
I think above approach misleads to self-task creation in their inbox as I have used impersonating users inbox , so this is not right approach for "How can one user assigning task to other user in O365 "