Skip to content
Trustaige Docs

Enroll Apple devices with a work email

Point your domain's Apple enrollment record at Trustaige so people enroll iPhones, iPads and Macs by signing in with their work email.

  • Scale
  • Needs the Apple push certificate
  • Needs Managed Apple Accounts
  • About 15 minutes
  • Rolling out
View as Markdown

This page is for whoever runs the website at your organization’s email domain. Your Trustaige administrator wants people to enroll their iPhones, iPads and Macs by signing in with their work email, and for that, Apple devices must find Trustaige through one small file on your domain. You should have received two values from them: your email domain and your organization short ID. Type them into the values panel and every address below fills in.

The whole job is one redirect, usually one line of configuration:

WhatValue
Your domain must answerhttps://<your-domain>/.well-known/com.apple.remotemanagement
With a redirect tohttps://id.trustaige.com/mdm/apple/discovery/<your-org-id>
Or with this file, as application/jsonThe record

Pick your web server or host and follow its section: nginx, Cloudflare, Vercel, Netlify or Apache. Then check it is served.

How it works

When someone chooses Sign In to Work or School Account on an Apple device and types their work email, the device takes the domain after the @ and asks that domain where to enroll. Your domain answers with a short JSON record that names Trustaige. The device then opens Trustaige’s sign-in, the person proves it’s them with their passkey, and the device downloads its enrollment profile and installs it. There’s no profile file to send around and no QR code.

  1. Device to Your domain: GET /.well-known/com.apple.remotemanagement
  2. Your domain to Device: 301 to Trustaige's copy of the record
  3. Device to Trustaige: GET /mdm/apple/discovery/{short ID}
  4. Trustaige to Device: record: mdm-adde, BaseURL
  5. Device to Trustaige: POST BaseURL
  6. Trustaige to Device: 401: sign in at …/auth (apple-as-web)
  7. Device and Trustaige: person signs in with their passkey
  8. Device to Trustaige: POST BaseURL with the access token
  9. Trustaige to Device: enrollment profile
Your domain is involved only in steps 1 and 2. If you host the record yourself, step 1 returns it directly and step 3 is skipped.

Apple devices follow the redirect, so the lightest setup is a permanent redirect to the copy of the record Trustaige hosts for your organization. That copy is always current, and it stops advertising Trustaige on its own if your organization stops managing Apple devices. You can also serve the record yourself; see Host the file yourself.

What you need

You needWhy
The ability to change what https://<your-domain>/ servesApple asks the exact domain in people’s email addresses, over HTTPS, with a valid certificate. A www. site alone isn’t enough; if the bare domain already redirects to www., add the rule on the www. site, since the device follows each redirect in turn.
The organization short IDIt’s part of the redirect target. Your administrator copies it from Work email enrollment in the hub.
A public answerThe hub checks the record from the internet, and so do devices on mobile networks. A domain that only resolves inside your network won’t work.

Nothing on your site changes except this one path. The redirect never carries your visitors anywhere, because only Apple devices ask for it.

Redirect with nginx

Add this to the server block that serves your bare domain on port 443:

server {
    listen 443 ssl;
    server_name <your-domain>;
    # your existing configuration

    location = /.well-known/com.apple.remotemanagement {
        return 301 https://id.trustaige.com/mdm/apple/discovery/<your-org-id>;
    }
}

Test and reload:

sudo nginx -t && sudo nginx -s reload

Then check it is served.

server {
    listen 443 ssl;
    server_name <your-domain>;
    # your existing configuration

    location = /.well-known/com.apple.remotemanagement {
        return 301 https://id.trustaige.com/mdm/apple/discovery/<your-org-id>;
    }
}
sudo nginx -t && sudo nginx -s reload

Redirect with Cloudflare

Use this when your domain’s DNS is on Cloudflare and the bare domain’s record is Proxied (the orange cloud). Redirect Rules apply only to proxied traffic.

  1. In the Cloudflare dashboard, open your domain and go to Rules → Redirect Rules, then Create rule.

  2. Under When incoming requests match, choose Custom filter expression and set: URI Path equals /.well-known/com.apple.remotemanagement. In the expression editor that is:

    (http.request.uri.path eq "/.well-known/com.apple.remotemanagement")
  3. Under Then, choose a Static redirect to https://id.trustaige.com/mdm/apple/discovery/<your-org-id> with status code 301.

  4. Deploy the rule.

The same rule, in short:

Rules → Redirect Rules → Create rule:
  When incoming requests match: URI Path equals /.well-known/com.apple.remotemanagement
  Then: Static redirect to https://id.trustaige.com/mdm/apple/discovery/<your-org-id>, status 301

Then check it is served.

Rules → Redirect Rules → Create rule:
  When incoming requests match: URI Path equals /.well-known/com.apple.remotemanagement
  Then: Static redirect to https://id.trustaige.com/mdm/apple/discovery/<your-org-id>, status 301

Redirect with Vercel

Add the redirect to vercel.json at the root of the project that serves your bare domain. If the file already has a redirects array, add the entry to it.

{
  "redirects": [
    { "source": "/.well-known/com.apple.remotemanagement", "destination": "https://id.trustaige.com/mdm/apple/discovery/<your-org-id>", "permanent": true }
  ]
}

Deploy to production. Vercel answers a permanent redirect with status 308, which Apple devices follow like a 301. Then check it is served.

{
  "redirects": [
    { "source": "/.well-known/com.apple.remotemanagement", "destination": "https://id.trustaige.com/mdm/apple/discovery/<your-org-id>", "permanent": true }
  ]
}

Redirect with Netlify

Add this line to the _redirects file in your site’s publish directory (the folder Netlify deploys, such as public or dist), creating the file if it doesn’t exist:

/.well-known/com.apple.remotemanagement https://id.trustaige.com/mdm/apple/discovery/<your-org-id> 301

If you configure redirects in netlify.toml instead, the same rule is:

[[redirects]]
  from = "/.well-known/com.apple.remotemanagement"
  to = "https://id.trustaige.com/mdm/apple/discovery/<your-org-id>"
  status = 301
  force = true

Deploy, then check it is served.

/.well-known/com.apple.remotemanagement https://id.trustaige.com/mdm/apple/discovery/<your-org-id> 301
[[redirects]]
  from = "/.well-known/com.apple.remotemanagement"
  to = "https://id.trustaige.com/mdm/apple/discovery/<your-org-id>"
  status = 301
  force = true

Redirect with Apache

Add this line to the .htaccess file at the root of your bare domain’s site, or to its <VirtualHost *:443> block. It needs mod_alias, which is on by default, and, in .htaccess, AllowOverride FileInfo or All.

Redirect 301 /.well-known/com.apple.remotemanagement https://id.trustaige.com/mdm/apple/discovery/<your-org-id>

If you edited the virtual host, test and reload:

sudo apachectl configtest && sudo apachectl graceful

Then check it is served.

Redirect 301 /.well-known/com.apple.remotemanagement https://id.trustaige.com/mdm/apple/discovery/<your-org-id>
sudo apachectl configtest && sudo apachectl graceful

Host the file yourself

If you’d rather not redirect, serve this record at /.well-known/com.apple.remotemanagement on your bare domain:

{
  "Servers": [
    {
      "Version": "mdm-adde",
      "BaseURL": "https://id.trustaige.com/mdm/apple/account-enroll/<your-org-id>"
    }
  ]
}

It must come back with status 200 and Content-Type: application/json. Apple requires that content type, and most servers send a file without a known extension as application/octet-stream, so set it explicitly:

location = /.well-known/com.apple.remotemanagement {
    default_type application/json;
    alias /var/www/well-known/com.apple.remotemanagement;
}
<Files "com.apple.remotemanagement">
    ForceType application/json
</Files>

mdm-adde tells the device to do an account-driven Device Enrollment, which is the only kind Trustaige serves. A record you host doesn’t change when your organization does: if it ever stops managing Apple devices, remove the file.

{
  "Servers": [
    {
      "Version": "mdm-adde",
      "BaseURL": "https://id.trustaige.com/mdm/apple/account-enroll/<your-org-id>"
    }
  ]
}
location = /.well-known/com.apple.remotemanagement {
    default_type application/json;
    alias /var/www/well-known/com.apple.remotemanagement;
}
<Files "com.apple.remotemanagement">
    ForceType application/json
</Files>

Check it is served

Ask for the record the way a device does, following redirects:

curl -sSL -D - https://<your-domain>/.well-known/com.apple.remotemanagement

With a redirect, you should see the redirect, then Trustaige’s answer (the HTTP version and other headers vary):

HTTP/2 301
location: https://id.trustaige.com/mdm/apple/discovery/<your-org-id>

HTTP/2 200
content-type: application/json
cache-control: no-store

{"Servers":[{"Version":"mdm-adde","BaseURL":"https://id.trustaige.com/mdm/apple/account-enroll/<your-org-id>"}]}

If you host the file yourself, you see a single 200 with content-type: application/json and your file’s contents. Either way, the BaseURL must end in your organization short ID.

A 404 from Trustaige’s copy means the redirect works but your organization isn’t ready: the Apple push certificate isn’t set up yet, or Apple device management isn’t available to your organization. Tell your administrator.

You can also check the enrollment address the record points to. Asked without a sign-in, it answers 401 and tells the device where to send the person to sign in:

curl -si -X POST https://id.trustaige.com/mdm/apple/account-enroll/<your-org-id>
HTTP/2 401
www-authenticate: Bearer method="apple-as-web" url="https://id.trustaige.com/mdm/apple/account-enroll/<your-org-id>/auth"

Last, tell your administrator it’s done. They run the hub’s own check (below), which fetches the record from the internet and confirms it.

curl -sSL -D - https://<your-domain>/.well-known/com.apple.remotemanagement
HTTP/2 301
location: https://id.trustaige.com/mdm/apple/discovery/<your-org-id>

HTTP/2 200
content-type: application/json
cache-control: no-store

{"Servers":[{"Version":"mdm-adde","BaseURL":"https://id.trustaige.com/mdm/apple/account-enroll/<your-org-id>"}]}
curl -si -X POST https://id.trustaige.com/mdm/apple/account-enroll/<your-org-id>
HTTP/2 401
www-authenticate: Bearer method="apple-as-web" url="https://id.trustaige.com/mdm/apple/account-enroll/<your-org-id>/auth"

Set up in the hub

This part is for the Trustaige administrator. You need the Scale plan and permission to manage devices.

  1. Set up the Apple push certificate first (Apple devices). Until it exists, the Work email enrollment card says “Set up the APNs push certificate above first — your domain’s enrollment record stays inactive until the push channel exists.”
  2. In Devices → Providers → Apple, find Work email enrollment and click Set up your domain.
  3. Step 1, Point your domain at Trustaige, shows the address Apple devices look up, https://<your-domain>/.well-known/com.apple.remotemanagement, the address to redirect it to, and your Organization short ID, each with a Copy button. Send this page to whoever runs your website, with your domain and organization short ID.
  4. Once they’ve added it, click Verify domain in step 2, Verify the record.

The hub fetches the record the way an Apple device does, following redirects, and checks it has a server entry whose BaseURL is your organization’s enrollment address. You’ll see Domain verified with “Discovery record correctly points “mdm-adde” enrollment at this server”, and the card’s header shows Domain verified. Raw response shows what your domain returned. Click Re-verify to check again later.

The domain is your organization’s own domain, the one shown in step 1’s title. The hub sets up work email enrollment for that one domain.

The card also tells you where Managed Apple Accounts stand. Apple finishes every work email enrollment by having the person sign in to their Managed Apple Account, issued through Apple Business Manager. With Apple Business Manager connected, the card says so; without it, it asks you to connect it first. To have people sign in to those accounts with their Trustaige passkey as well, connect Apple Business.

What the person sees

Devices need iOS 17, iPadOS 17 or macOS 14 or later.

  1. iPhone or iPad: open Settings → General → VPN & Device Management. Mac: open System Settings → General → Device Management.
  2. Choose Sign In to Work or School Account and type their work email.
  3. Trustaige’s sign-in opens inside the device’s sign-in sheet. They sign in with their passkey. If they’re signed in to another organization, Trustaige asks them to sign in to yours.
  4. The device downloads its enrollment profile and installs it, then asks them to sign in to their Managed Apple Account to finish.

The device then appears under Devices → Fleet, tied to the person who signed in, and your policies apply as for any other enrolled device.

Turn it off

Remove the redirect (or the file) from your domain. Devices that already enrolled stay enrolled; new ones can no longer find Trustaige by email. To remove management from an enrolled device, see Remove a device from management.

Troubleshooting

“Failed to reach https://…/.well-known/com.apple.remotemanagement”

The hub couldn’t connect to your domain over HTTPS: no answer, a DNS name that only resolves inside your network, or a certificate that isn’t valid for the bare domain. The error underneath says which. Run the curl check from outside your network.

“Discovery endpoint returned HTTP 404”

If curl shows the redirect and then a 404 from id.trustaige.com, the redirect is right and your organization isn’t ready: set up the Apple push certificate first. If the 404 comes from your own server, the rule isn’t in effect: check it’s on the site that serves the bare domain, that it’s deployed, and on Cloudflare that the record is Proxied.

“Response is not a valid service discovery record”

Your domain answered 200 but not with the JSON record, often your site’s normal page or a “not found” page served with status 200. Raw response shows what came back. Check the path is exactly /.well-known/com.apple.remotemanagement, with no extension.

“Discovery record does not contain a server entry pointing to …”

The record is JSON but its BaseURL isn’t your organization’s enrollment address, usually a mistyped short ID in the redirect or the file. Compare it with the address in the message.

“Failed to read response body”

Your domain started answering and stopped. Try again; if it persists, check your server’s logs for that path.

The hub says Domain verified, but devices can't find the server

The hub checks the record’s contents, not its content type, and Apple requires application/json. If you host the file yourself, check the content-type line in the curl check. Also check the person typed an email address at exactly your domain.

“Apple enrollment is not available for your organization yet”

The person signed in, but Apple device management isn’t available to your organization. Ask Trustaige support.