How to Deploy the DoH (User Context) Profile on Apple Mobile Devices Using Microsoft Intune
This article explains how to deploy the SecureEdge DNS-over-HTTPS (DoH) configuration profile to iPhone and iPad devices using Microsoft Intune. It covers how to customize the provided .mobileconfig file for your tenant, create and assign an iOS/iPadOS Custom configuration profile, and verify the deployment on a device. Once the profile is installed, iOS applies a system-wide DoH configuration, ensuring that DNS requests from all applications and browsers, including Safari, Chrome, Edge, and Firefox, are securely resolved through your SecureEdge DoH service.
MDM-enforced DNS over HTTPS (DoH) requires a supervised device:
Enroll the device via Automated Device Enrollment (
Apple Business Manager/DEP) to enable supervision and activate MDM-enforced DoH.Alternatively, supervise the device using
Apple Configurator; this process requires erasing the device first.
Profile File
Profile file | How it works |
|---|---|
SecureEdge-DoH.mobileconfig
| Per-user profile
Device/Static profile
|
Choose the Appropriate DoH Profile
Deployment Scenario | Profile to Use | Notes |
|---|---|---|
User devices enrolled through Company Portal or ADE with user affinity | Per-user profile | Intune automatically populates the signed-in user's UPN. |
Shared iPads or devices enrolled without a dedicated user | Device/static profile | Configure the |
Important
Deploy only one SecureEdge DoH profile per device. iOS supports a single managed DNS resolver at a time. The deployment steps in this article apply to both profile types; upload and assign the profile that matches your deployment scenario.
Before You Begin
Download the profile files (
SecureEdge-DoH.mobileconfigandSecureEdge-DoH-DeviceStatic.mobileconfig) from the Barracuda Networks download portal.Microsoft Intune admin rights are required to create and assign configuration profiles.
Devices must be enrolled with user affinity (Company Portal or Automated Device Enrollment with user affinity) when using the per-user profile. User affinity is required for the per-user
{{userprincipalname}}token to resolve.You must obtain your DoH URL:
In SecureEdge Manager, go to Infrastructure > DNS Locations, open your DNS location, and select View DNS Setup. Copy the DNS over HTTPS URL (User Context) value. This URL contains a
{{userprincipalname}}placeholder that Intune fills in per user at delivery time. For more information, see How to Add a DNS Location in SecureEdge.
Supervised devices are recommended if you want the profile locked (tamperproof).
Step 1. Prepare the .mobileconfig file
Open SecureEdge-DoH.mobileconfig in a text editor and update the following two fields for your tenant before uploading it to Intune.
Set the ServerURL
Replace the host and tenant ID placeholder with your SecureEdge DNS over HTTPS URL (User Context), keeping {{userprincipalname}} exactly as shown:
https://<your-doh-host>/dns/<id>/user/{{userprincipalname}}/dns-queryNote
{{userprincipalname}} is an Intune substitution token that uses double curly braces. When Intune deploys the profile, it automatically replaces the token with each user's UPN. This is the iOS equivalent of the win32 {user_email} runtime substitution. Do not pre-fill this value with a user's email address.
Set the ServerAddresses
In the ServerAddresses array, enter the fallback resolver IP address or addresses used to bootstrap the DoH connection. Use the DNS Server IP value from the same DNS Location in SecureEdge Manager.
On-Demand Rules
The profile includes built-in on-demand rules that always bypass DoH for captive.apple.com (required for Wi-Fi captive portal detection) and Barracuda service domains. All other DNS traffic is routed through DoH.
The profile is removable by users (ProhibitDisablement / PayloadRemovalDisallowed = false).
Step 2. Prepare the Certificate
A trusted certificate (.cer) must be pushed to devices alongside the DoH profile so that iOS trusts the SecureEdge TLS inspection chain.
In SecureEdge Manager, go to Security > TLS Inspection > Certificates.
Download the TLS inspection certificate. The file downloads as a
.pemfile.Convert the
.pemto a.cerfile using the following OpenSSL command:
openssl x509 -inform PEM -in certificate.pem -outform PEM -out certificate.cerFor more information, see TLS Inspection.
Step. 3 Create the iOS/iPadOS custom configuration profile in Intune
Open the Microsoft Intune admin center and go to Devices > Apple mobile.
In the left menu, select Manage devices and click Configuration.
Select + Create > + New Policy.
The Create a profile window opens. Specify the values for the following:
Platform – Select iOS/iPadOS from the drop-down menu.
Profile type – Select Templates from the drop-down menu.
Template name – Select Custom.
Click Create.
On the Basics tab, enter a name, for example
SecureEdge DoH.Click Next.
On the Configuration settings tab, specify the values for the following:
Custom configuration profile name – Enter a name, e.g.
SecureEdge DoH. Note: this name appears on the device.Configuration profile file – Upload the
SecureEdge-DoH.mobileconfigfile you prepared in Step 1.
Click Next.
On the Assignments tab, assign the profile to a user group. Assigning the profile to users rather than devices allows Intune to resolve the
{{userprincipalname}}variable for each user. To validate the deployment, assign the profile to a pilot group before rolling it out to all users.Click +Add group, add the group and click Select.
Click Next.
On the Review + create tab, review the configuration, and click Create.
You can see profile “SecureEdge DoH ” created successfully.
Step 4. Create the Trusted Certificate Policy
In the Microsoft Intune admin center, go to Devices > Apple mobile.
In the left menu, select Manage devices and click Configuration.
Select + Create > + New Policy.
The Create a profile window opens. Specify the values for the following:
Platform – Select iOS/iPadOS from the drop-down menu.
Profile type – Select Templates from the drop-down menu.
Template name – Select Trusted certificate.
Click Create.
On the Basics tab, enter a name, for example
SecureEdge DoH Certificate.On the Configuration settings tab, specify the value for the following:
Certificate file – Upload the
SecureEdge-DoH.cerfile you generated in Step 2.
Click Next.
On the Assignments tab, assign to the same user group.
Click Next.
On the Review + create tab, review the configuration, and click Create.
Step 5. Verify the Deployment on the Device
After Intune delivers the profiles, sync the device. On the device, go to Settings > General > VPN & Device Management and tap Sync, or initiate a sync from the Intune admin center.
Confirm the Profile is Installed
On the device, go to Settings > General > VPN & Device Management and verify that the SecureEdge DoH profile is installed and shows a DNS configuration.
|
|
|
Verify the per-user URL Resolved Correctly
Open the profile details and confirm that the DNS configuration contains the user's actual email address rather than the
{{userprincipalname}}placeholder. This confirms that Intune successfully resolved the user identity during deployment.
Confirm DNS-over-HTTPS is Active
Generate normal web traffic from the device and verify that DNS requests appear in the SecureEdge Manager DNS logs for the assigned user. The queries should be associated with the user's identity. Because iOS does not provide a built-in interface to display the active DNS resolver, SecureEdge Manager DNS logs or a DNS leak test website are the recommended methods for verifying that DNS-over-HTTPS is active.
Note
iOS has no built-in interface that identifies the active DNS resolver by name. If queries do not appear in SecureEdge Manager DNS log after a few minutes, confirm the device is supervised, the profile shows as installed (not just downloaded), and the certificate is trusted under Settings > General > VPN & Device Management.
Expected Result
The SecureEdge DoH profile is installed and verified, the DNS configuration contains the signed-in user's UPN, and DNS activity from the device is visible in SecureEdge Manager under that user.