Question
How do I disable MFA for the email parser user?
Answer:
OAuth 2.0 does not work with MFA when the application type is a background service with no manual interaction. MFA is built for manual user interaction to provide MFA code and authenticate.
For the users who are concerned about disabling the MFA for the email parser user, they can simply do it by IP Address. Only requests coming from the PSA server with OAuth token requests can bypass MFA, and this will remove the concerns. This can be done as follows:
Log into Microsoft admin portal (https://admin.microsoft.com/adminportal/home/).
Click Users > Active Users.
Next, click Multi-Factor Authentication.
Select the user whose MFA is enabled and then click service settings. You will be taken to a different page.
Under Trusted IPs, click in the text box and type the IP address or range of addresses that you want to exclude from MFA based on the PSA server used.
Click Save.