You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Introduction 

In this tutorial, we will show the process of sending emails using Microsoft Graph API with Joget JSON Tool. The guideline will help you automate the process of sending emails, making it a more efficient and streamlined process. This article will provide a step-by-step guide to help set up and send emails using Microsoft Graph API and Joget JSON Tool.

Set Up Azure Application

Before going to Joget to use the Microsoft Graph API, we first must create the Azure application that has the permission to use this API, follow the steps below and you will have everything you need to send emails using the Microsoft Graph API.

Create Developer Account

To start creating your Azure application, you must first sign up on Azure here, but simply signing up using your personal Microsoft account wouldn't work as it won't give you full access to Azure. To get this access, you will need to join the Microsoft Developer program.

To join the Microsoft Developer program, simply sign up in their website with your personal Microsoft account, and get yourself a Microsoft 365 Developer subscription, you can either purchase it, or get a 90 day free trial.

Use the email in the "Administrator" section to sign up for your Azure account and this time you will have full access to it.

Register Application

So now with the Azure account set up, we can begin registering an application. 

To register an application go to:

  1. Azure Active Directory
  2. App Registrations
  3. New Registration
  4. Choose a name for the app
  5. Select your support type, for this guide, we will be using the third one

  6. And for this guide, ignore the redirect URI
  7. Register


After this you should see in the overview you have an "Application (client) ID" and a "Directory (tenant) ID", these two are important so that your API call will actually be using your app and your account.

Get Client Secret

Next up is to get your client secret.

To do this, from the app's overview page, go to:

  1. Certificates and Secrets
  2. New Client Secret
  3. Enter description and expire duration
  4. Add client secret

After doing so, you now should have a "value" and "ID", copy paste this "value" somewhere like a Notepad.

Client Secret Value

Make sure you secure this value before leaving or refreshing the page as the value will become hidden afterwards.

Add API Permissions

Last thing to do is to give the Azure app the permission to send emails via the Microsoft Graph API.

To do this, from the app's overview page, go to:

  1. API Permissions
  2. Add a Permission
  3. Microsoft Graph
  4. Application Permissions (for this guide we are using application permissions)
  5. Add "Mail.Send"
  6. Optionally, also add "User.Read.All" (this is for if you want to see the list of users who can use this Azure app, by default, Microsoft should give you a dozen dummy accounts when creating an Azure account)
  7. Add Permissions
  8. Press "Grant Admin Consent for MSFT"

And now your Azure app has the permission to send emails!

Using Joget JSON Tool to Call API

Dancing cow

Demo App

Here is the demo app that showcases this guide, please do keep in mind all of the information related to the Azure app has been left empty since those should be filled with your own Azure app. Most of these empty information can be find in the process of the application.

  • Send Email using MS Graph Demo





  • No labels