Microsoft Graph Connector - How to Use in Mendix

0
Hi Everyone,   I'm pretty new to Mendix but one of the key requirements we will have is to be able to interact with our M365 tenancy to 'do things'. For example, send email, upload and access files to / from Sharepoint, post and access messages in Teams etc. In reading up on possible solutions it seems that using Microsoft Graph would be the best way forward as it allows the cumulative addition of permissions to do all these things so createing and managing the Azure app for this becomes a little simpler.    I have managed to set up the Graph Connector app following the write up from Vineet Agarwal but this only goes as far as setting up the app in Azure and configuring and running the connector. What it (and literally hundreds other posts) doesn't do is explain how to use the authorization in a Mendix microflow. There is some vague 'create an authorization and use it in a Microflow'. Great. HOW do we use that in a Microflow, what activities do we put in and where and what order? The various learning modules don't cover specific requirements like this and there seems to be a huge lack of additional documentation for it.   Does anyone have (or can anyone point me towards) a basic walkthrough of how to do something straightforward like send a really basic, non-dynamic email to an address when a button is clicked? I can then use that to help find and understand the steps required to make other things work.   Please note - I have already successfully tested the Email Connector - that was a pretty well laid out, straightforward module, but I need to do more than just send an email, it's just the first (and should be easiest) step in the journey.   Any help here is appreciated!
asked
1 answers
1

David,

In the Microsoft Graph module, there are some microflows that access Graph API functions using the authorization information.  You can use these as an example of how to use the Authorization information.  One of these microflows is SUB_User_GetMyPhoto.  Walking through this microflow, you'll see that an Authorization object is passed into sub microflow Get:

image.png

 

Inside of the GET microflow, you'll see that the Authorization token is decrypted and then used as an Authorization header in a REST call to the GRAPH API

image.png

You can repeat this pattern for all of the GRAPH calls you need to make.

 

Hope that helps,

Mike

answered