Email sending via the Connector NAV/BC using Microsoft Graph API
Short description
This guide explains, concisely and in a structured way, how to configure email sending in Business Central (Connector NAV/BC) using the Microsoft Graph API.
Prerequisites
- Access to the Entra/Azure AD tenant with rights to register apps and grant admin consent.
- Business Central with the Connector NAV/BC installed.
1. Create an Entra/Azure AD app
- Portal: Entra ID (Azure Portal) → App registrations → New registration.
- Note down:
- Application (client) ID
- Directory (tenant) ID
- Certificates & secrets: create a new client secret and store the value securely.
- API permissions:
- Mail.Send (Application) - required
- Redirect/Reply URI: any URI can be entered (not technically relevant for the connector).
Note: Client secrets are sensitive and must not be stored unencrypted.
2. Grant admin consent
- In Business Central: Connector NAV/BC → Setup → subpage “E‑Mail Graph API Setup”.
- Enter the client ID, tenant ID, secret (and optionally the redirect URI).
- Action: “Grant admin consent” → a browser window opens.
- An administrator signs in with a Microsoft account and approves the consent.
Important: Do not activate the setup until admin consent has been successfully granted.
3. Configure the email senders
- Connector NAV/BC → page “E‑Mail Sender”.
- Add all sender email addresses that should be used for sending.
- Field “Password”: not required for Graph API - leave empty.
- For shared mailboxes: check “Shared mailbox”.
– Verify: in the user setup the “E‑Mail” field must be filled (used for permission checks).
4. Enable sending
- After app registration, admin consent and sender configuration are complete:
- Connector NAV/BC → Setup → subpage “E‑Mail Graph API Setup”
- Check “Setup active” to enable sending via Graph API.
Troubleshooting (brief)
- 401 / permission error: Is Mail.Send (Application) missing or was admin consent not granted?
- Admin consent fails: allow browser pop‑ups, try another browser or admin account.
- Secret expired: create a new secret and update it in BC.
Security notes
- Store client secrets securely (Key Vault or similar).
- Restrict access to app registration and secrets to authorized admins only.