Learn to test passkey behavior on managed iOS & Android devices where syncing is disabled. A technical, hands-on guide for developers and testers.
Vincent
Created: June 16, 2025
Updated: March 27, 2026

+70-page Enterprise Passkey Whitepaper:
Learn how leaders get +80% passkey adoption. Trusted by Rakuten, Klarna & Oracle
.mobileconfig profile with 'Disallow iCloud Keychain sync' enables
managed testing: iOS 18 allows device-bound passkey creation while iOS 16 and 17 block
it entirely.afw#testdpc provisions a fully managed
device; enabling DISALLOW_AUTOFILL_SERVICE blocks Google Password Manager from saving
or providing passkeys.DISALLOW_AUTOFILL_SERVICE policy on Android 14 blocks passkey creation
entirely: no user prompt appears and the Credential Manager API returns an error to the
application.This guide offers developers and test engineers a comprehensive walkthrough to simulate enterprise-managed environments for testing passkey behavior in native iOS and Android applications. We focus on scenarios where corporate policies disable passkey syncing via iCloud Keychain and Google Password Manager, a common setup in corporate environments. This article is technical and based on real-world testing with physical devices.
The guide details the setup of a managed iOS test and a managed Android test environment. By simulating corporate policies that disable passkey syncing, you can validate your application's passkey implementation on managed devices. The procedures are based on hands-on testing with physical devices.
Our goal is to create a test environment that mimics an iPhone where a Mobile Device Management (MDM) profile forbids iCloud Keychain synchronization. This will force passkeys to be "device-bound," stored only in the device's Secure Enclave.
Want to experiment with passkey flows? Try our Passkeys Debugger.
Relying parties can determine if a passkeys work on a device by using the ´isUserVerifyingPlatformAuthenticatorAvailable()´ JavaScript API in the browser.
Let's review the steps to configure the test environment.
Want to try passkeys yourself in a passkeys demo?
We will use the iMazing Profile Editor to create a profile that disables keychain syncing.
com.yourcompany.disablekeychainsync..mobileconfig file.To install the profile, the iPhone must be "supervised," which typically requires a factory reset.
.mobileconfig file you just created.With the "Disable iCloud Keychain" profile active, passkeys become device-bound. They are created and stored exclusively in the device's Secure Enclave and will not synchronize across a user's devices. This is a critical managed iOS test case.
The user experience during passkey creation may differ slightly across iOS versions, but the underlying principle remains the same.
ASAuthorizationController will complete successfully, returning a
valid credential.For Android, our goal is to set up a "fully managed" device and use a Device Policy Controller (DPC) to block passkey syncing via Google Password Manager. This setup is a common scenario for a corporate managed device.
adb) installed on your computer for inspection.Let's see the different steps needed to get to our test setup.
We will use a special code during setup to install Google's Test DPC app as the device owner. This grants it full administrative control.
afw#testdpc.Once the device is set up, we'll use the Test DPC app to apply the necessary restrictions.
DISALLOW_AUTOFILL_SERVICE): This is the primary policy that
prevents Google Password Manager (and
other autofill services) from saving or providing passkeys.* **Disallow modify accounts** (`DISALLOW_MODIFY_ACCOUNTS`): This adds a secondary layer of restriction, preventing users from adding or removing accounts, which can interfere with sync services.
With the above configuration, passkeys should become device-bound. They would be created and stored only in the local Trusted Execution Environment (TEE) and will not sync.
For testing, you might need to enable Chrome from the system apps. To do so:
Below are the results from our managed Android test on different OS versions.
Passkey creation and login work as long as a device screen lock is set up. However, the passkey is not synced via Google Password Manager, thus it's only available on this one device, making it effectively device-bound.
On Android 14, our managed Android test revealed that the DISALLOW_AUTOFILL_SERVICE
policy is highly restrictive. When an application initiates the create call from the
Credential Manager API, the operating system may not show any user-facing prompt for
passkey creation, including the screen lock or biometrics confirmation. Consequently,
passkey creation fails and the API returns an error to the application. This makes it
impossible to create or test device-bound passkeys
under this specific policy configuration.
The following diagram summarizes the observed behavior in our test environments.
Testing passkeys in an environment that simulates corporate restrictions is a non-negotiable step for any application intended for enterprise use. By following this guide, you can configure both managed iOS and managed Android devices to create robust test cases for device-bound passkeys.
This validation ensures that your application handles these scenarios gracefully, provides clear user feedback, and maintains a high standard of reliability and security. Proactively testing on a managed device will prevent unexpected issues for your enterprise customers and is a critical part of a comprehensive quality assurance strategy.
Use the free iMazing Profile Editor to create a .mobileconfig file with the 'Disallow iCloud Keychain sync' restriction enabled, then deploy it to a supervised iPhone via Apple Configurator. The iPhone must be supervised, which typically requires a factory reset, but no paid MDM server is necessary.
On Android 14, the DISALLOW_AUTOFILL_SERVICE policy prevents the OS from showing any user-facing prompt during passkey creation, including biometric or screen lock confirmation, so the Credential Manager API returns an error. On Android 12, passkey creation succeeds under the same policy and the credential is stored locally in the TEE without syncing to Google Password Manager.
On managed iOS 18 with iCloud Keychain sync disabled, passkey creation completes successfully via ASAuthorizationController and the user receives a notification that the passkey is device-bound only. On iOS 16 and iOS 17 under the same restriction, passkey creation cannot be completed and an error message is displayed.
Relying parties can use the isUserVerifyingPlatformAuthenticatorAvailable() JavaScript API in the browser to determine if a passkey-capable platform authenticator is available on the device. This check helps applications handle managed device scenarios gracefully before initiating a passkey creation or authentication flow.
Related Articles
Table of Contents