Share via

Microsoft 365 graph sendmail api how to integrate in node js

ajmalsabith 0 Reputation points
2026-01-21T07:44:23.4433333+00:00

To complete the email integration for your application, we need your assistance to enable secure Microsoft Graph API access for the shared mailbox:

******@crestorations.com.au
This permission must be configured inside your Microsoft 365 tenant, because the mailbox belongs to your organization.
Without this setup, our system cannot send emails using your shared mailbox.
Below are the steps your administrator needs to perform.
 Step 1 — Create an App Registration

  • Sign in to the Azure Portal: https://portal.azure.com
  • Go to Azure Active Directory → App registrations
  • Click New Registration
  • Name: CowanReportsMailApp
  • Supported account type: Single Tenant
  • Register the app
  • After creation, copy and send us:
  • Application (Client) ID
  • Directory (Tenant) ID

Step 2 — Create a Client Secret

  • Open the newly created App
  • Go to Certificates & Secrets
  • Click New client secret
  • Add any description → Click Add
  • Copy the Client Secret Value and send it to us securely

(It will not be visible again)
Step 3 — Add API Permission for Sending Emails

  • Go to API Permissions
  • Click Add permission
  • Choose Microsoft Graph
  • Select Application Permissions
  • Search and add:
  • Mail.Send
  • Click Grant Admin Consent

You should see:
Mail.Send — Application — Granted for Cowan
 Step 4 — Grant “Send As” Permission to the Shared Mailbox

  • Go to Exchange Admin Centerhttps://admin.exchange.microsoft.com
  • Click Recipients → Shared Mailboxes
  • Select ******@crestorations.com.au
  • Go to Mailbox Delegation
  • Under Send As, click Add
  • Search and select the Enterprise Application you created

(CReportsMailApp)
This gives our integration permission to send emails using the shared mailbox.
📩 Information Needed Back from You
Once complete, please send us:

  • Client ID
  • Tenant ID
  • Client Secret
  • Confirmation that

CReportsMailApp has Send As permission on
******@cestorations.com.au
We will then complete the backend configuration on our side.

can pls verify for the Microsoft send mail process is this correct setup step by step
this we need to share with the client to create this setup and we have to integrate in Javascript with the details

Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-01-21T07:44:40.5466667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The setup steps you've outlined for integrating the Microsoft Graph API to send emails using a shared mailbox in Node.js are correct. Here’s a summary of the steps:

    1. Create an App Registration in the Azure Portal:
      • Sign in to the Azure Portal and navigate to Azure Active Directory → App registrations.
      • Click New Registration, name it (e.g., CowanReportsMailApp), and select Single Tenant.
      • After registration, copy the Application (Client) ID and Directory (Tenant) ID.
    2. Create a Client Secret:
      • Open the app you just created, go to Certificates & Secrets, and click New client secret.
      • Add a description and click Add. Copy the Client Secret Value immediately as it will not be visible again.
    3. Add API Permission for Sending Emails:
      • Go to API Permissions, click Add permission, choose Microsoft Graph, and select Application Permissions.
      • Search for and add Mail.Send, then click Grant Admin Consent.
    4. Grant “Send As” Permission to the Shared Mailbox:
      • Access the Exchange Admin Center, navigate to Recipients → Shared Mailboxes, and select the shared mailbox.
      • Under Mailbox Delegation, add the Enterprise Application you created to the Send As permissions.

    After completing these steps, you should confirm that the CReportsMailApp has the necessary permissions to send emails using the shared mailbox. You can then proceed to integrate the email sending functionality in your Node.js application using the Microsoft Graph API.

    For the actual integration in JavaScript, you can refer to the Microsoft Graph documentation for examples on how to send emails programmatically.


    References:

    Was this answer helpful?

Your answer

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