D365 Explainer ·

Sending email from a mailbox nobody can sign in to

A common setup is a shared mailbox that a Power Automate flow uses as the sender: a do-not-reply address, or just as often a notifications@ or accounts@ that exists for sending, not receiving, and that nobody actually signs into. Do-not-reply is just the example here; the actual condition that matters is that there's no interactive login for the account. In Dataverse this looks simple, but you can hit two errors. The second one can't be fixed by an admin in the normal UI. Here's how I got it working without raising a ticket.

The setup

Problem 1: the mailbox won't enable

The mailbox showed Pending Approval, and Test & Enable then failed with a message about a missing prvReadActivity privilege.

Fix:

  1. An admin approves the mailbox. In the Power Platform admin centre this is under Settings > Email > Mailboxes > Approve Email.
  2. Set Incoming = None and Outgoing = Server-Side Synchronization.
  3. Run Test & Enable again. Outgoing should show Success. Incoming can stay "Not Run".

The privilege error appeared because incoming mail was set to server-side sync, which needs read rights for the owning user. A send-only mailbox doesn't need incoming mail, so no security role change was needed.

Problem 2: "The user selected in the From field does not have the option enabled to allow other users to send the email on their behalf"

This is the harder one.

Fix: set it by impersonation

The service account had no security roles, so impersonating it failed with "has not been assigned any roles… need prvReadUserSettings". Impersonation only carries the privileges of the user being impersonated, so an account with nothing assigned can't be impersonated at all yet.

  1. Temporarily give the service account a role.
  2. As someone with prvActOnBehalfOfAnotherUser (System Administrator has it), impersonate that user and set issendasallowed = true on their user settings.
  3. Remove the temporary role. The flag stays set.
  4. Test manually: create an Email, set From to the queue and To to your own address, then Send. It should arrive and show as Sent.

The service account ends up with no roles, as before, and only the one flag changed.

I did step 2 with the Level Up extension (the XrmToolBox-style impersonation tool), which is the quickest no-code route if you have it. The same thing is reachable directly through the Dataverse Web API, which is worth knowing if you need to script this across environments or don't have Level Up available.

✓ Verified against the Microsoft Learn UserSettings table reference and Web API impersonation docs
Sample Web API request
PATCH [Organization URI]/api/data/v9.2/usersettingscollection(<service account's systemuserid>) HTTP/1.1
Authorization: Bearer <admin's own access token>
CallerObjectId: <service account's Microsoft Entra ID object ID>
Content-Type: application/json; charset=utf-8
Accept: application/json
OData-MaxVersion: 4.0
OData-Version: 4.0

{
  "issendasallowed": true
}

Three things worth being precise about:

The temporary-role step (1 and 3 above) still applies either way: the impersonated account needs enough privilege during the call to write its own UserSettings row, whether you're doing that call through Level Up or through this request directly.

Checklist for each environment

  1. Confirm the user, queue and mailbox exist, and note the queue id. It differs per environment, so keep it in an environment variable.
  2. Approve the mailbox. Set incoming to None and outgoing to Server-Side Sync. Test & Enable.
  3. Temporarily add a role, impersonate, set issendasallowed = true, remove the role, and check the flag is still true.
  4. Do the manual send test.
  5. Run the flow, with a dry run first.

Things to watch

Useful Microsoft Learn pages

← Back to FlowNarrate