Configure Email Notifications¶
The portal can send email notifications for:
- Request submitted confirmations
- Approval required notifications to approvers
- Request approved/rejected notifications to requestors
Prerequisites¶
- Mail.Send permission must be added to your API app registration (see Create Entra App Registrations, item 8)
- A user mailbox or shared mailbox to send emails from
Add Mail.Send permission¶
If you didn't add it during initial setup:
- Navigate to Azure Portal > Microsoft Entra ID > App registrations
- Select your backend API app registration
- Click "API permissions" > "Add a permission"
- Select "Microsoft Graph" > "Application permissions"
- Search for
Mail.Sendand check it - Click "Add permissions"
- Click "Grant admin consent for [your tenant]" (requires Global Admin or Privileged Role Administrator)
Get the user object ID¶
You need the Object ID of the user or shared mailbox that will send emails:
- Navigate to Azure Portal > Microsoft Entra ID > Users
- Search for and select the user (or shared mailbox)
- Copy the Object ID from the Overview page
Tip: You can create a dedicated shared mailbox like
apprequest-noreply@yourdomain.comfor this purpose.
Option A: Configure via portal settings UI (recommended)¶
- Navigate to Admin > Communications tab
- Under Email Notifications:
- Toggle Enable email notifications on
- Enter the Send As User ID (Object ID of mailbox)
- Enter the From Address (email address)
- Enter the Portal URL (for email links)
- Click Save Settings
Option B: Configure via appsettings.json¶
Update appsettings.json:
{
"EmailSettings": {
"SendAsUserId": "user-object-id-here",
"FromAddress": "apprequest-noreply@yourdomain.com",
"PortalUrl": "https://your-portal-url.com"
}
}
| Setting | Description |
|---|---|
SendAsUserId |
The Object ID of the user or shared mailbox to send emails from. If empty, email notifications are disabled. |
FromAddress |
The email address shown in the From field (should match the mailbox). |
PortalUrl |
The URL of your portal, used for links in email notifications. |
Tip: Settings configured in the UI take precedence over appsettings.json values |
Test email notifications¶
- Submit an app request
- Check that the requestor receives a confirmation email
- Check that approvers receive an approval request email
- Approve or reject the request and verify the requestor receives the result notification
Troubleshooting email issues¶
- 403 Forbidden: Ensure
Mail.Sendpermission has admin consent granted - User not found: Verify the
SendAsUserIdis a valid Object ID - Email not sent: Check the API logs for detailed error messages
Next step¶
Continue to Configure Microsoft Teams Bot (optional).