pingferry

Setup guide · About 15 minutes per tenant

Connect Microsoft 365 to pingferry

Let pingferry send your device alerts through Microsoft 365, from one mailbox only. No DNS changes, and no permission for any other mailbox.

Not the Microsoft 365 admin? Forward this page to your IT admin — hands-on setup takes about 15 minutes.

After setup Enforced by Exchange
  • Send as alerts@yourcompany.com
    One shared mailbox, no license needed
    Allowed
  • Send as any other mailbox
    Refused by Exchange
    Blocked
  • Read mail, users or files
    No such permission exists
    Blocked

What you need

Step 1 · Mailbox

Create one shared mailbox

In the Microsoft 365 admin center, go to Teams & groups → Shared mailboxes → Add a shared mailbox. Name it Alerts with the address alerts@yourcompany.com. A shared mailbox needs no license. An existing alerts mailbox works too, but don't use a person's mailbox.

Step 2 · App

Register the app

In the Microsoft Entra admin center, go to App registrations → New registration:

  • Name: pingferry
  • Supported account types: Accounts in this organizational directory only (Single tenant)
  • Redirect URI: leave empty, then click Register.

On the app's Overview page, copy the Application (client) ID and the Directory (tenant) ID.

Step 3 · Certificate

Upload the certificate and remove all API permissions

  • In the app, open Certificates & secrets → Certificates → Upload certificate and choose pingferry-m365.cer. Check that the thumbprint matches the one shown in your dashboard. Don't create a client secret.
  • Open API permissions and remove the default User.Read, so the list is empty.
Don't add Mail.Send in Entra, and don't grant admin consent. An Entra permission applies to every mailbox in your organization, and Entra and Exchange permissions add up. It would undo the one-mailbox limit from step 5.

Step 4 · Object ID

Copy the Enterprise application Object ID

In the Entra admin center, go to Enterprise applications, open pingferry and copy its Object ID. This is a different ID from the one on the App registrations page. Mixing the two up is the most common mistake.

Step 5 · Exchange

Allow sending from alerts@ only

Our setup script tells Exchange that pingferry may send as your alerts mailbox and nothing else. Then it checks that sending as another mailbox is refused. It is safe to run twice, and -WhatIf shows what it would do without changing anything.

Fill in your values. The command below updates as you type, and nothing is sent anywhere.

Open PowerShell 7 in the folder with the script and paste:

Install-Module ExchangeOnlineManagement -Scope CurrentUser; Unblock-File ./Connect-PingferryM365.ps1; ./Connect-PingferryM365.ps1 -AppId "00000000-0000-0000-0000-000000000000" -ServicePrincipalObjectId "00000000-0000-0000-0000-000000000000" -Sender "alerts@yourcompany.com" -VerifyDeniedMailbox "you@yourcompany.com"

A browser window opens for the Exchange sign-in. Use the browser sign-in, not the code sign-in (-Device), because tenants with security defaults block it. On Linux, leave out Unblock-File …;.

Error: "run Enable-OrganizationCustomization"

This happens in new or small tenants. Run Enable-OrganizationCustomization once, wait a few minutes (sometimes up to 20) and run the script again. It unlocks custom settings and changes nothing else.

Error: "You must be assigned a delegating role assignment"

Seen in tenants created the same day: Exchange hasn't given the Global Administrator full Exchange rights yet. Add your admin account to the Exchange admin group, then sign in again and rerun the script:

Add-RoleGroupMember "Organization Management" -Member admin@yourcompany.com
Disconnect-ExchangeOnline

If that answers "only a manager of the group", wait about an hour and try again.

Prefer to run the three Exchange commands by hand?

After Connect-ExchangeOnline:

New-ServicePrincipal -AppId "00000000-0000-0000-0000-000000000000" -ObjectId "00000000-0000-0000-0000-000000000000" -DisplayName "pingferry"
New-ManagementScope -Name "pingferry sender" -RecipientRestrictionFilter "PrimarySmtpAddress -eq 'alerts@yourcompany.com'"
New-ManagementRoleAssignment -Name "pingferry send as alerts" -App "00000000-0000-0000-0000-000000000000" -Role "Application Mail.Send" -CustomResourceScope "pingferry sender"
Optional: attachments over about 3 MB

Only needed if a device sends large mails, such as scanned PDFs or camera snapshots (up to about 25 MB of attachments). Run the script again with -LargeAttachments. pingferry can then also read and change mail in your alerts mailbox, and only there. Tell us when you've done it.

Step 6 · Wait

Allow up to 2 hours

Exchange takes 30 minutes to 2 hours before the new permission works. Until then, test mails are refused with "access denied". That is normal, and nothing needs to be redone. Meanwhile, check in the Entra admin center under Enterprise applications → pingferry → Permissions that the list is empty.

Step 7 · Finish in the dashboard

Save the three values in your dashboard

In app.pingferry.com, enter your Directory (tenant) ID, Application (client) ID and alerts mailbox. None of them is a secret. The dashboard tests the connection, confirms that other mailboxes are refused, and lets you create a dedicated login for each device (or send an installer a one-time setup link). Then point each device to smtp.pingferry.com, port 587 (STARTTLS) or 465 (SSL/TLS).

Removing access

Fastest: in the Entra admin center, open Enterprise applications → pingferry → Properties and set Enabled for users to sign-in? to No, or delete the app registration. pingferry is locked out at its next sign-in. Removing only the Exchange permission (Remove-ManagementRoleAssignment "pingferry send as alerts") takes up to 2 hours.

Ready to connect your first tenant?

Start your 14-day trial — your dashboard sign-in link arrives right away.