Outlook add-in request search messages via API
Hello,
I have an add-in for outlook (usage for both desktop and web), and I am trying to make a simple call for searching outlook messages.
Now, I've tried to look for anything that can do that in the 'Office' object (https://learn.microsoft.com/en-us/javascript/api/office?view=outlook-js-preview)
Unfortunately, I did not find any method that can possibly do that.
The only thing I've found is making a post request and receiving back the messages in a response (https://learn.microsoft.com/en-us/graph/search-concept-messages)
I did not figure out how to use this, because I don't know how to reach the access token. I tried using Office.auth.getAccessToken but I'm getting back an error 13000.
Is there a simple way to do a search request?
How can I get the access token with the Outlook add-in application?
Thank you in advance,
Roy