Microsoft continuously enhances its products and services, and there are multiple APIs available for interacting with Outlook features. For my specific use case, I need to access Outlook Tasks within a JavaScript-based add-in.
I have come across the following options but am unsure which is the most recommended and future-proof solution:
My Requirement
Questions
OfficeJs APIs are the APIs provided for web addins and you should use these whenever possible. If you do not find API for your scenario in OfficeJs APIs you can use other APIs. For these APIs you will need to acquire auth token. You can try using Microsoft Graph APIs as it's most recent. For more details on enabling SSO and acquiring Graph token for addins please check here
You can also use Office JS API(makeEwsRequestAsync) to make EWS request this would not require you to acquire access token separately. Please refer to doc here for more details