Running the service
Contacts and calendars on phones without the app
A device group's contacts in the phone's own Contacts, and its calendars in the phone's own Calendar, as read-only CardDAV and CalDAV accounts an MDM sets up, on iPhone, iPad, Mac and Android.
A phone does not need the ContactMesh app to have the company’s contacts. iPhone, iPad and Mac sync an address book from a CardDAV server into their own Contacts, and Android does the same through DAVx⁵. ContactMesh is that server: a device group’s contacts, read only, kept current by the phone itself. An MDM — Intune, Workspace ONE or Jamf — sets the account up, so nobody types anything.
The same connection also carries the group’s calendars — holidays, closures, a rota — over CalDAV, into the phone’s own Calendar, for people with a phone and no mailbox. See Calendars.
Phones › Connections lists them. A connection needs the Phones module; its calendars need Calendars too.
What the phones get
Section titled “What the phones get”A connection serves one device group, exactly as the app would put it into the phone’s Contacts:
- the contacts of every publication the group receives, through the publication’s filters, rules — its name and number format among them — and field set, or the group’s own field set;
- one card a person, however many of the group’s publications bring them;
- as signed off: while an edit to a publication waits for its sign-off, the phones keep the version signed off;
- only contacts the group’s publication lets into the phone’s Contacts: one set to Never there is not in the address book, and of the rest the name always, and the organisation, numbers, e-mail addresses, address and picture as the group’s phone fields allow. Optional counts as yes: the account is the switch.
A person who leaves — removed at the source, filtered out, erased — leaves every phone at its next sync. The cards are vCard 3.0, with pictures.
The address book is read only. A phone’s change to a card is refused, and the account says so: DAVx⁵ marks the address book read only.
Making a connection
Section titled “Making a connection”New connection: choose the device group. A group may have several connections, for example one for the MDM’s phones and one for phones set up by hand, so each can be revoked alone.
| Column | Shows |
|---|---|
| User name | The connection’s, the same in every profile. Not a secret |
| Access | Read only. While a rotation runs, until when the old passwords work |
| Last connected | When a phone last signed in, to the minute |
| Devices | Devices that synced in the last 30 days |
| Calendars | Calendar publications the group’s phones get beside the contacts |
Devices is counted by the sync state each device keeps: a device’s first sync starts it, every later sync continues it. A phone set up again counts twice until its old state is 30 days old; a client that never syncs by state is not counted. CardDAV names no device, so no closer count exists.
Calendars
Section titled “Calendars”A calendar publication reaches a device group’s phones when its Audience tab names the group under Phones, beside everyone’s or the chosen groups’ mailboxes, or alone for a rota of people who have no mailbox. Each publication is one calendar in the phone’s own Calendar app, under the same account as the contacts.
What the phones get is what the publication delivers to a mailbox:
- the same events, under the publication’s signed settings: while an edit waits for its signature, the phones keep the version signed, as the mailboxes do;
- the same fields: the subject and times always, the location and description only where the publication delivers them, its category, Show as, the sensitivity and the importance;
- nobody’s name or address beyond what the event’s text says: no organiser, no attendees, a rota’s person never; a mailbox source’s private events never;
- every occurrence as an event of its own, as in the mailbox;
- the same reminder, as an alarm, where the publication or the source sets one; otherwise the phone’s own default applies.
A new or changed event reaches the phones at their next sync after the publication’s next refresh, a quarter of an hour at most; a paused publication’s calendar stays as it was. Taking the group out of the audience, or archiving the publication, takes the calendar off the phones. An erasure takes the events naming the person off every phone at once.
The calendars are read only: a phone’s change is refused, and iOS and DAVx⁵ show the calendar as read only.
On iPhone, iPad and Mac
Section titled “On iPhone, iPad and Mac”Download profile and the QR code carry a second account, for the calendars, beside the contacts’ one, with the same password. Nothing else changes: upload or install the profile as below. A publication added to the group later appears on the phones on its own; a profile downloaded before the licence had Calendars carries no calendar account, so download it again.
On Android with DAVx⁵
Section titled “On Android with DAVx⁵”DAVx⁵ finds the calendars at the same server as the address book.
- By hand: when adding the account, choose the calendars beside the address book. New password names the calendars’ server too, for a client that asks for it alone.
- Managed DAVx⁵: the same configuration;
preselect_collectionssyncs the calendars without a tap.
A calendar added to the group later shows once DAVx⁵ refreshes its list of calendars: in the account’s CalDAV tab, Refresh list. A calendar taken away syncs empty until then.
Passwords
Section titled “Passwords”The password is a long random token, never a password anybody chose or can look up later. Every profile, QR
code and password the dashboard hands out carries a token of its own, shown in that file or dialog and nowhere
else. ContactMesh keeps only a hash. Handing one out, rotating and revoking need credentials.manage and a recent
proof of who you are.
- Rotate gives every password of the connection an end, a day from now (
CardDav:RotationGraceHours). Download the profile again and push it before then: the MDM replaces the account on each device. - Revoke stops every password at once. The next download makes one that works.
- Delete removes the connection; every phone using it is refused from then on.
iPhone, iPad and Mac with an MDM
Section titled “iPhone, iPad and Mac with an MDM”Download profile saves a configuration profile (.mobileconfig) with one CardDAV account, and a CalDAV account
beside it where the licence includes Calendars: the server, the port, SSL, the user name and a password made for the
file. The file is a credential: upload it, then delete it.
Its identifier stays the same, so a profile uploaded again replaces the account rather than adding one.
Intune advises against custom profiles for sensitive settings. This one’s password opens one read-only address book and the group’s read-only calendars, belongs to this profile alone, and is rotated or revoked here.
Intune
Section titled “Intune”Devices › iOS/iPadOS › Configuration › Create › New policy, profile type Templates › Custom. Give it a name, upload the file as the configuration profile file, and assign it to the devices’ group. For a Mac, Devices › macOS, the same, with the deployment channel set to User channel.
Workspace ONE
Section titled “Workspace ONE”Resources › Profiles & Baselines › Profiles › Add › Upload Profile, for Apple iOS or macOS. Upload the file and assign the profile to the devices’ smart group.
Jamf Pro
Section titled “Jamf Pro”Devices › Configuration Profiles › Upload (for a Mac: Computers › Configuration Profiles › Upload). Choose the file, then set the scope.
An iPhone outside the MDM
Section titled “An iPhone outside the MDM”Show QR code shows a QR code for a link that downloads the profile once, within ten minutes. The QR code holds no password: the password is made when the phone downloads the profile.
- Scan the code with the iPhone’s camera and open the link.
- Tap Download profile and allow the download.
- In Settings, tap Profile Downloaded, then Install.
The profile shows as not verified: it is not signed. A link used, or past its ten minutes, says so; show a new QR code.
Android with DAVx⁵
Section titled “Android with DAVx⁵”By hand
Section titled “By hand”New password shows the server, the user name and a password once. In DAVx⁵, add an account with Login with URL and user name: the server as the base URL, then the user name and the password. Choose the address book and switch on its sync.
Managed by the MDM
Section titled “Managed by the MDM”DAVx⁵ takes its settings from an MDM only in its organisations’ edition, Managed DAVx⁵
(com.davdroid.managed), with a licence from its makers. The app from Google Play or F-Droid reads no managed
configuration.
The row’s menu downloads Managed DAVx⁵’s configuration, the keys filled:
| Key | Value |
|---|---|
login_base_url | The server: https://contactmesh.example.com/carddav/ |
login_user_name | The connection’s user name |
login_password | A password made for the file |
login_credentials_lock | 2: nobody changes them on the phone |
force_read_only_addressbooks | true |
preselect_collections | 1: the address book syncs without a tap |
default_sync_interval | 3600: an hour, where the app’s own is four |
organization | The tenant’s name |
Add Managed DAVx⁵’s license and license_signature beside them.
- Intune: Apps › Configuration › Create › Managed devices, Android Enterprise as the platform and Managed DAVx⁵ from Managed Google Play as the Targeted app; on Settings, Configuration settings format › Enter JSON data, and paste the file.
- Workspace ONE: Resources › Apps › Native, Managed DAVx⁵, Assign, and in the assignment Application Configuration switch Send Configuration on and add the keys of the table, one row each.
Reaching the phones
Section titled “Reaching the phones”Basic authentication sends the password on every request, so ContactMesh answers over HTTPS only: through the reverse proxy, or from the host itself. A phone needs a certificate it trusts; a private one has to be installed on the phone.
A proxy that passes only some paths to ContactMesh, as the phones’ proxy in a DMZ does, has to pass /carddav/ and
/.well-known/carddav, and, for the calendars, /caldav/ and /.well-known/caldav. Passwords refused from one
address are limited to thirty a minute, counted over both.
How often a phone syncs
Section titled “How often a phone syncs”As often as it is set to: iOS by Settings › Apps › Contacts › Accounts › Fetch New Data, DAVx⁵ by its sync interval. A phone asks whether anything changed and fetches only the cards and events that did. A change at the source reaches a phone at its first sync after the source’s next round.