How to use Outlook Mail API in Web App

Leon Match 1 Reputation point
2020-04-09T21:22:12.227+00:00

Hello,
We have a Web App build with Oracle Apex.
We are using Azure AD for users authentication. Our App already registered in Azure.

We need to open Outlook Email from Web App and pass email's Title, To and Cc values, and an Attachment.
We prefer to open Outlook Email in a modal window or new browser window.

I read Outlook Mail API documentation but still can't figure out how to do all these API calls from our Web App?
We are trying to follow JavaScript example from this article:
https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=javascript

It is not clear which URL user will need to click to invoke the API and open Outlook Email?

Also we probably need to create JSON POST request. How to do that in a Web App with Javascript?
Is there any end to end examples for that with Javascript?

Need a push in a right direction please.

Thank you!

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,142 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Saurabh Sharma 23,826 Reputation points Microsoft Employee
    2020-04-09T22:18:50.97+00:00

    You can use Microsoft Graph SDK for Javascript which provides various features to enhance working with all Microsoft Graph Services with less complexity. You can find the steps to follow, code snippets and how to use the library over here. Basically, you need to register your application in Azure AD and provide necessary Microsoft Graph permissions to the registered application to perform various graph operations.

    This page also provides few samples and tutorials to start with.

    Additionally, you can refer to the documentation here to learn more on using REST for Outlook API.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.