Is there a way to use Microsoft Identiy Platform with a OAuth 2.0 flow without using ROPC auth flow in Node-Red? I can't use ROPC, because the destination tenant enforces MFA. ROPC will be blocked when MFA is enforced.
I found the plugin node-red-contrib-oauth2, but wasn't able to get this working with Microsoft Identity Platform with another OAuth 2.0 flow, other than ROPC.
The solution is to use Device Code Flow. The following instructions give you a flow which is able to read your Microsoft Teams presence status / Microsoft Office 365 presence status with node-red.
Creating the App in the Azure Portal
In the following example we will create an app which is able to read only the logged in users presence. This means, that the API permissions may vary depending on your needs.
Explanation:
Now this app can be used in Node-Red for reading the presence from MS Graph API.
Use this App in Node-Red
A good starting point for a flow of that kind is this:
This gives you the following flow which is able to read your Microsoft Teams presence status / Microsoft Office 365 presence status with node-red: