web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Reply To Not Working W...
Power Apps
Unanswered

Reply To Not Working With MFA Enabled

(1) ShareShare
ReportReport
Posted on by 20

Hello! 

 

I'm currently working on allowing a user to reply to an email within a ticketing system but am running into the following error:

 

maria_rizo_1-1686066168214.png

The code that seems to be giving the error is this: 

Office365Outlook.ReplyToV2(
Gallery4_1.Selected.messageID,
{
Body: RichTextEditor6.HtmlText,
Attachments: RenameColumns(DataCardValue9.Attachments, "Value", "ContentBytes"),
Subject: TextInput3.Text,
To: Concat(
ComboBox4.SelectedItems,
Mail & ";"
),
Cc: Concat(
ComboBox5.SelectedItems,
Mail & ";")
}
);

 

After a bit of testing, I noticed that the error only seems to appear when the user accessing the apps has MFA enabled on their account. We currently have an MFA policy which excluded PowerApps and Microsoft flows but it still doesn't seem to be going through. Getting rid of the MFA is out of the questions so does anyone have any suggestions for how to get around this without disabling the MFA entirely?

 

Thank you in advance!

Categories:
  • gcmfaizan Profile Picture
    1,022 on at

    Hi @maria_rizo ,


    When working with Office 365 Outlook connectors in Power Apps and encountering issues related to MFA (Multi-Factor Authentication), there are a few steps you can take to address the situation while keeping MFA enabled.

    Here are a couple of suggestions to work around the MFA issue:

    1. Using App Passwords (Recommended Approach): App passwords are an authentication method for apps that don't support modern authentication, such as some Office 365 applications including Power Apps in some scenarios. To use app passwords, you need to generate an app password from your account settings in Office 365. This password is used to authenticate your app while still keeping MFA enabled on your account.

      Here's how you can use an app password:

      • Go to your Office 365 account settings.
      • Find the section for app passwords (it might be under Security or Additional security options).
      • Generate a new app password specifically for your Power App.
      • Use this app password in your Power App's Office 365 Outlook connector instead of your regular password.

      This way, your Power App can authenticate without interfering with MFA.

    2. Using a Service Account: If using app passwords isn't suitable for your organization, consider creating a service account with MFA disabled. This service account can be used specifically for interacting with Office 365 Outlook connectors in your Power App. The service account's credentials can be used in your Power App to send emails.

      Be cautious when using service accounts, as they should be managed properly and have the minimum required permissions.

    3. Consider Power Automate (Flow) as an Alternative: Instead of sending emails directly from Power Apps, you could trigger a Power Automate flow that handles the email sending. Power Automate provides more flexibility in dealing with authentication and is often used for more complex integrations.

      In Power Automate, you can create a flow triggered by a Power Apps button press or any other suitable event. The flow can use its own set of credentials for sending emails.

      I recommend you use power automate for this.

    Please mark this post as Solution if it helps you. Thanks,

  • maria_rizo Profile Picture
    20 on at

    Thanks for the info! Regarding option 2 we actually are using a service account as a way of interacting with the Outlook connector that has MFA disabled, though the error still arises when the individual accessing the app from their own work account attempt to send an email using said connector. If the individual does not have MFA set up on their account, then they are able to successfully send an email using the connector. However, MFA is a policy that's being deployed company-wide so every account accessing the app will need to have it enabled sometime in the near future. Regarding options 3, sadly when I did try moving the emailing process to power automate the same error arose.

  • gcmfaizan Profile Picture
    1,022 on at

    Sorry feeling bad, as you already tried service account and power automate, so 

    here are a few additional considerations and suggestions:

    1. Use Delegated Permissions: Instead of using a service account, consider using delegated permissions with the account of the user accessing the app. Delegated permissions allow the app to access Office 365 services on behalf of the user, leveraging their credentials.

    2. Use Azure AD Application and Consent: If you need to interact with Office 365 services programmatically, you can create an Azure AD application, grant it the necessary permissions, and use it to authenticate and interact with services like Outlook. This approach can work with MFA-enabled accounts, but it requires careful setup and configuration.

    I hope may it help you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard