Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

Image RemovedImage Added

To join the Microsoft Developer program, simply sign up on 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.

...

After this you should see in the app's 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.

...

https://login.microsoftonline.com/[TENANT ID HERE]/oauth2/v2.0/token

So, enter the appropriate information into your first JSON Tool and keep the Body Type as "Request Parameters".

Image Added

Info

Make sure to insert your own tenant ID

Next up is to give the request the appropriate parameters, this request will need 4 things:

  • A client ID
  • The client secret
  • A grant type
  • And a scope

Following the steps above, you should have the client ID and client secret with you, simply enter those two values with the name "client_id" and "client_secret".

For the grant type, in this guide we are using the client credentials authentication flow, we are using this for this guide so that we don't need to worry about logging the user in when getting an access token. Enter the value "client_credentials" with the name "grant_type".

And finally for the scope enter the link:

  
So, enter these appropiate information into your first JSON Tool and keep the Body Type as "Request Parameters"https://graph.microsoft.com/.default

Other authentications flow would let you be more specific with your scope, like entering "Mail.send" but for client credentials it must have a value with the "/.default" suffixed to the application ID URI, which by default is "https://graph.microsoft.com/". Enter the link to the value with the name "scope".

Image Added

The result of this request takes form of a JSON object, if your request was successful, the JSON object should look something like this:

Code Block
languagejava
{
    "token_type": "Bearer",
    "expires_in": 3599,
    "ext_expires_in": 3599,
    "access_token": "412076657279206c6f6e67206a756d626c6564207069656365206f662074657874"
}

The "access_token" property of this JSON object is what we need for our second JSON tool, and for this guide, we will store this value in a workflow variable. You can create a workflow variable by going to the "Process Property", which in Joget DX8, is accessible via the pencil icon beside your process' name.

Image Added

Add as many variables as you need and name them appropriately.

Back at your JSON tool, scroll down to the "Store to Workflow Variable" setting and enter the variable of your choice and give the JSON object name "access_token".

Image Added

And with that, we have successfully requested and stored our access token for the second JSON tool.

Sending the Email

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.

...