Running the service
Notifications
What is waiting on you, sent by e-mail, to a Teams channel or to any webhook — at once when it appears or changes, and once a day as a digest — and how ContactMesh sends e-mail.
Settings › Notifications sends the bell’s list to people who are not looking at the dashboard: by e-mail, to a Microsoft Teams channel, or as signed JSON to any URL — a monitoring system, a ticketing tool, Slack. It is the bell’s list exactly, the same kinds and the same items, so the bell, the e-mails and the webhooks never disagree.
The page is an Admin’s (notifications.manage), reading included: a channel names the addresses it
mails. A channel’s secret — a Teams or webhook URL, a signing key — and outgoing mail’s password are
credentials (credentials.manage), and changing one asks for a recent proof of who you are, as a
tenant’s credential does.
What is sent, and when
Section titled “What is sent, and when”An item is sent when it appears, and again only when it changes — when it waits for a different reason, such as a tenant whose credential runs out soon and then has run out. A count that moves on its own, such as how many operations a pause is holding, is not news; the digest carries the current figures. An item that leaves the bell and comes back within ten minutes is the same occurrence and is not sent again.
ContactMesh reads the bell once a minute, every item of every kind however many there are. A worker sends what is new within seconds of that, one message per channel for everything that appeared or changed at once: it lists the first twenty of each kind, a Teams card ten, and counts the rest. Each kind is headed by the bell’s own line, counted as the bell counts: 7 contacts waiting for a decision above the folders they are in, 4 operations stopped above the reasons.
Each item says why it waits as the bell says it, in the channel’s language. Where the reason is a fault — Entra refusing a tenant’s credential, a source read refused, a folder in fault — its code follows the sentence in brackets, which is what to search for; a code from Microsoft that ContactMesh has no sentence for is given as the code alone.
Each channel chooses:
| Setting | What it decides |
|---|---|
| Kinds | Which of the bell’s kinds it gets. None chosen is every kind, including kinds added later. |
| At once | Whether items are sent as they appear and change, and from which severity: everything, or faults only. A fault is what the bell shows in red: something has stopped and only a fix moves it. The rest is a decision nobody has made yet, or a hold somebody chose. |
| Daily digest | E-mail only: one message a day, at the time you set, listing everything of the chosen kinds that is still waiting, whatever its severity. None is sent on a day nothing waits. |
| Quiet hours | A window, such as 22:00 to 06:00, in which nothing is sent. A message waits until it ends, and leaves out what was dealt with in the meantime. |
| Time zone | Where the digest’s time and quiet hours are read, as an IANA zone such as Europe/Zurich. |
| Language | English or German, written as each is written. |
A new channel, and one switched back on, starts with what is new from then on; what already stands is the digest’s and the bell’s.
What cannot be sent. No worker is answering is on the bell, but the worker is what sends, so it cannot say so. Watch for that with the monitoring endpoint — its worker heartbeat channel — rather than by e-mail.
Channels
Section titled “Channels”Up to fifty addresses, one per line. A channel is sent faults at once by default and everything in a digest each morning; both can be changed. E-mail goes through outgoing mail, below.
Microsoft Teams
Section titled “Microsoft Teams”Teams’ Office 365 connectors and their incoming webhooks are retired (Microsoft finished switching them off in May 2026). A channel posts through a Workflows webhook instead:
- In Teams, open the channel’s … menu and choose Workflows.
- Choose the template Send webhook alerts to a channel, name it, and save it.
- Copy the webhook URL it shows, and paste it into the channel’s URL.
ContactMesh posts an Adaptive Card to it. The URL carries the signature Teams trusts, so it is stored as
a secret. A URL of a retired connector (…webhook.office.com) is refused when you save it.
Webhook
Section titled “Webhook”A webhook is sent JSON, signed, to any https or http URL. Paste the URL and a signing key of at least
32 characters — Generate makes one in your browser; copy it before saving, as it is never shown again.
Every request carries:
| Header | |
|---|---|
X-ContactMesh-Timestamp | When it was sent, in seconds since 1970. |
X-ContactMesh-Signature | sha256= and the HMAC-SHA-256, in lowercase hexadecimal, of the timestamp, a full stop and the raw body. |
X-ContactMesh-Event | notifications.alert, notifications.digest or notifications.test. |
X-ContactMesh-Delivery | The message’s id. A retry sends the same one, so a receiver can tell a retry from a second message. |
To check a request, work out the signature from the bytes as they arrived and compare it in constant time, and refuse a timestamp more than five minutes old:
signed = timestamp.encode() + b"." + raw_bodyexpected = "sha256=" + hmac.new(key.encode(), signed, hashlib.sha256).hexdigest()ok = hmac.compare_digest(expected, signature) and abs(time.time() - int(timestamp)) < 300The body has a text line at the top — the e-mail’s subject, which Slack’s incoming webhooks show — and
the items as codes and figures, each with its sentence beside it:
{ "type": "notifications.alert", "id": "…", "createdAt": "…", "channel": "Operations", "language": "en", "text": "ContactMesh: 1 tenant whose sign-in fails or runs out soon", "dashboard": "https://contactmesh.example.com/#/", "total": 1, "kinds": [{ "kind": "SignInFailing", "severity": "Fault", "count": 1, "total": 1, "headline": "1 tenant whose sign-in fails or runs out soon", "items": [{ "key": "SignInFailing:…", "name": "Contoso", "context": null, "reason": { "code": "CredentialExpiring", "operands": { "count": 3 }, "text": "Its credential runs out in 3 days" }, "state": "new", "link": "https://contactmesh.example.com/#/tenants/…?section=credential" }] }]}A kind’s count is the headline’s figure, as the bell counts it; total is how many items it has, of which
items lists the first. They differ where the bell counts what the items hold: contacts for an adoption
decision, listed by folder, and stopped operations, listed by reason.
Links need PUBLIC_ORIGIN; without it a message carries none.
Internal addresses
Section titled “Internal addresses”A Teams or webhook channel never posts to this machine, to its network’s link-local addresses or the
cloud’s metadata service (169.254.169.254 and the like), to a multicast address, or to none. A URL that
writes one out, or localhost, is refused when you save it. A name is checked each time a message goes,
on the address it resolves to then, so a name that later points inside cannot pass; such a message fails
at once, without retries.
Private ranges — 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 100.64.0.0/10, fc00::/7 — are
allowed, so a monitoring or ticketing system on your own network can be a channel; ContactMesh’s hosted
service refuses them too.
Behind a proxy. Where your network lets the server out only through a proxy, set HTTPS_PROXY (and
NO_PROXY for what stays inside) on the API and the worker, as Microsoft 365 needs anyway. Teams and
webhook messages then go through it. Every address the URL’s name resolves to is checked first, and the
proxy resolves the name again when it connects, so the proxy’s own rules are the second check.
Outgoing mail
Section titled “Outgoing mail”How ContactMesh sends e-mail, for notifications and for every later feature that sends one. Choose:
SMTP relay. The host, the port, and the protection — STARTTLS (usually port 587) or TLS from the first byte (usually 465); there is no unencrypted option. The server’s certificate is checked against the system’s trusted CAs and, where you paste one, your own CA in PEM, and its name always. A user name and password are optional, for a relay that trusts the network ContactMesh sends from.
Exchange Online is switching off basic authentication for SMTP client submission: it is off by default for existing tenants from the end of December 2026, and Microsoft will name the final date in the second half of 2027. To send through Exchange Online by SMTP, use a relay or an Exchange inbound connector that accepts ContactMesh’s address, rather than a mailbox’s password — or choose Microsoft 365 below.
Microsoft 365. Graph’s sendMail, as one mailbox, with one of your tenants’ own app. Its app needs
the Mail.Send application permission — and Mail.Send lets an app send as any mailbox unless
Exchange holds it to some, so limit it to the one mailbox:
-
RBAC for Applications (Microsoft’s way, which replaces application access policies): do not consent Mail.Send in Entra; grant Exchange’s Application Mail.Send role, scoped to that mailbox:
Terminal window New-ManagementScope -Name "ContactMesh sender" -RecipientRestrictionFilter "PrimarySmtpAddress -eq 'alerts@contoso.com'"New-ManagementRoleAssignment -App <service principal object id> -Role "Application Mail.Send" -CustomResourceScope "ContactMesh sender"Test-ServicePrincipalAuthorization -Identity <service principal object id> -Resource alerts@contoso.comThe service principal pointer is the one the contacts’ scope already made. A grant in Entra beside it would undo the scope: Entra’s and Exchange’s grants add up.
-
An application access policy, where Mail.Send is already consented in Entra:
New-ApplicationAccessPolicy -AppId <app id> -PolicyScopeGroupId <a group holding the mailbox> -AccessRight RestrictAccess.
Graph cannot see either, so the page never says the limit is in place. After a send it says what the
token showed: Every mailbox, unless an access policy limits it (Mail.Send is consented in Entra) or
Granted by Exchange; its scope not checked (it is not, so RBAC for Applications granted it). Check the
scope with Test-ServicePrincipalAuthorization, as above.
Per minute caps how many e-mails leave in a minute, across every worker, so a relay’s limits are not met by a burst.
Send test and the delivery log
Section titled “Send test and the delivery log”Send test, on a channel’s row and under outgoing mail, books a message for the worker, which sends it as it sends everything else — the same transport, the same retries. It needs a worker running. The delivery log shows what came of it within a few seconds, and of every other message: the channel, what was sent, its status, how many attempts it took and, for one that failed, why.
A message that fails is tried again after 1, 2, 4, 8, 16, 32 and 60 minutes — eight attempts over about two hours — and then marked Failed. A refusal that would repeat — a password refused, a URL that is gone, a certificate nobody vouches for — is marked failed at once. A server asking to slow down is believed. Not needed is a message held for quiet hours or a retry whose items were all dealt with before it could go.
Sent messages are kept for 30 days and failed ones for 90; see Configuration. No message carries a password, a token or a contact beyond the names the bell itself shows, and the log keeps the reason as a code, never the server’s own words.