community postIntegration & APIscommunity - not Microsoftreviewed - checked by Opus

Fixing Email for Guest Users in D365 Business Central

Guest users in Dynamics 365 Business Central cannot use the built-in email connectors for sending email. This post describes a Current User Email API extension that uses Microsoft Graph to enable guest users to send email as themselves via delegated authentication, requiring one-time admin setup and per-user consent.

post Wingate365

Andy Wingate · 2026-04-26 · 957 words · about 4 min

"Being able to send as yourself is an important capability"

Key points

  • Built-in Current User and M365/Shared Mailbox connectors fail for Entra B2B guest users, leaving only SMTP
  • The extension sends mail via Microsoft Graph using the OAuth 2.0 Authorization Code plus PKCE delegated flow, so mail comes from the user’s real address
  • Admin registers one Entra app with Mail.Send once; each user consents once on the Connect Current User Email API page
  • Tokens are kept per user in IsolatedStorage and silently renewed when they expire after about an hour
  • Open source PTE for BC SaaS; Phase 3 plans security hardening, Rest Client adoption, multi-tenant setup and attachment support

Quotes

  • “Being able to send as yourself is an important capability” (Highlights why the solution matters for identity clarity in modern connected systems)
  • “The connector resolves the correct Graph token for whoever is sending at that moment” (Explains the core technical approach that enables per-user email sending regardless of guest status)

AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

  • other “Connect Current User Email API page”
  • other “Email Setup Card”

Heads up

  • gotcha: “the built-in email connectors don’t work properly for guest users” (about version 2026 wave 1)
  • preview-disclaimer: “the current release is a working proof of concept - Phase 1 and 2 are complete”

Context

  • Features: Current User Email API, Microsoft Graph email sending, OAuth 2.0 delegated authentication, Silent token refresh, Per-user token storage, Email attachments support, Multi-tenancy support
  • Versions: 2026 wave 1

Source: Wingate365, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.