Applies to Product - Power Apps
What’s happening?
Customers are experiencing failures when attempting to send emails through custom-built Power Apps and Cloud Flows, resulting in error messages related to connection issues and token expiration.
Reason:
- The email failures in custom-built Power Apps are often caused by the app not updating to reflect changes made in the flow, particularly when the flow was updated to use a new connection while the app retains the old flow metadata.
- In Cloud Flows, the error "Runtime call was blocked because connection has error status: Enabled| Error" typically occurs due to expired refresh tokens, which can happen when connections are not used for 90 days, leading to security measures that block access.
Resolution:
- For Power Apps:
- Open the app for editing using the latest version of the studio.
- Remove the flows from the app by accessing the data sources pane and removing each flow.
- Re-add the flows to the app.
- Save and republish the app to ensure changes take effect.
- For Cloud Flows:
- Ensure the mailbox is licensed and active by checking in Microsoft 365 Admin Center.
- Enable the API (OWA & EWS) for the mailbox using the following PowerShell commands:
- Set-CASMailbox -Identity <MailboxIdentity> -OWAEnabled $true -EWSEnabled $true
- Remove any application access policies that may be blocking API access using:
- Remove-ApplicationAccessPolicy -Identity <PolicyName>
- Verify that Modern Authentication is enabled:
- Check with Get-OrganizationConfig | Format-Table -Auto ModernAuthentication
- If disabled, enable it with Set-OrganizationConfig -OAuth2ClientProfileEnabled $true
- Restart Power Automate and retry the email flow.
- Use Microsoft Graph API to test if the mailbox is accessible with:
- Test-MAPIConnectivity -Identity <MailboxIdentity>
- If the issue persists, consider re-authenticating the connection in the flow to refresh the access token and resolve the error status.
