Creating Outlook Meetings from your Mendix app
Automate being organised in 2022
Meeting invites — something every modern day worker uses or sends on a daily basis. But did you know you can create calendar invites using an integration to Microsoft 365? In this blog I will cover how to create and send calendar invites from your Mendix app and explain how it all works. So read along to get organised and automate your meeting invites in the new year.
Steps to Creating a Meeting in your Mendix APP:
We need an account to access Azure Active Directory. Create the developer account which has full admin access with the help of the Microsoft 365 Developer Program Membership.
Click here to set up a new Microsoft 365 E5 Subscription.
Note: Your Microsoft 365 Account will be valid only for 90 days.
After Creating an account use this link to check wether your selected Microsoft apps are created are not.
If you want to check if your account is active or not, use this link to check your account status.
What is Azure?
It is a cloud computing platform and an online portal to access and manage resources and services provided by Microsoft resources and services
What is Client ID?
It is an Identifier for your Azure App. This identifier will be assigned when a Sequence is set up as an application in the directory
What is Client Key?
It’s one of your Azure App identifiers. The secret key Sequence your app will use when communicating with AAD(Azure Active Directory). It expires based on the months of your App.
What is Tenant Id?
It is the tenant which is identified by a GUID(globally unique identifier),
For Example: Apps registered in Azure AD which use the Graph APIs to access tenant data must pass the tenant identifier along with the app identifier and app secret when requesting an access token, that’s why it’s a unique identifier.
To Create an App in Azure Active Directory , continue to follow these steps:
Sign into https://portal.azure.com/ with a developer account and open Azure’s Active Directory Overview.
Click Enterprise Applications from the left side navigation bar.
Click the New application button from the top of the screen and choose Nongallery application from the application types listed over there.
Enter the Name of the application and click Add.
Choose SAML from the single sign-on method.
Your app has ClientID and Tenant ID If you want to check, what is client ID and Tenant Id ( please refer To the above explanation of AAD)
Click Client credentials to generate client Secrets.
Set the expiry date of client Secret ID and Click add and you will get client secret ID and Value
NOTE: If you are going to use client secret ID, We need to use the value
Click API permission and give access to the app like mails, calendar and teams
Click Add a permission to give access to which you create the app in API Permission
Type of Permission:
- Delegated Permission:
Delegated permissions are used by apps that have a signed-in user present.
- Application Permission:
Application permissions are used by apps that run without the signed-in user present.
How to Implement in Mendix?
Why do we need to generate the access token?
We are using third-party URLs or services to achieve in our application we need to generate access tokens here we doing with the client ID and tenant ID.
How to Generate the access token Using Mendix?
HTTP Method :
Creating meetings in Microsoft Using your Mendix app
HTTP Method :
Authorization: ‘Bearer ‘ + #AccessToken#
You have send the entire request as input, using an export mapping to send the request.
Once You executed the microflow you will be able to see the invite link in your calendar, In the Mendix app by means of using the calendar widget.
How to get an email from Outlook?
Authorization: Bearer #token# (we got access token in generating access token process)
Note: If you want to retrieve any specific folder, make sure you configured the same folder name in your rest call
For Example: If you need to retrieve mails from the draft, then provide a draft in your rest call service.
I hope this tutorial on how to implement the creation of meetings using Azure Active Directory and Mendix. Remember to display the meetings in your Mendix app you can use the calendar widget available for download in the Marketplace
See you in the next article! Please post your comments if you have any questions :)
Make sure to check out the OIDC Module on the Marketplace — It can make this integration even easier!
Azure Active Directory documentation
Azure Active Directory (Azure AD) is Microsoft's multi-tenant, cloud-based directory, and identity management service…
Calendar - Marketplace Guide | Mendix Documentation
The Calendar widget can be used to display and manage calendar events. Add and edit calendar events Drag and drop…
From the Publisher -