Microflows in Mendix have access to two special variables, currentUser, and currentSession. The value for these variables is based on the user that initiated the microflow by clicking a button for example.
However, microflows can also be initiated by the system such as in scheduled events or integration endpoints such as rest.
When microflows are called by the system the value for currentUser and currentSession is empty so they should not be used.
Noncompliant example:
(assuming a microflow called from a scheduled event)if $currentUser/HasFlag then 'Foo' else 'Bar'
Compliant example:
Not using the currentUser or currentSession variable in any way in microflows called by the system.