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: July 18, 2025
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.
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.
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.
Enjoyed this read?
🤝 Join our Passkeys Community
Share passkeys implementation tips and get support to free the world from passwords.
🚀 Subscribe to Substack
Get the latest news, strategies, and insights about passkeys sent straight to your inbox.
Related Articles
Parallels Passkeys: Testing Cross Device Authentication on Windows 11 VM on a Mac
Vincent - September 20, 2024
Testing Passkey Implementations (Enterprise Passkeys Guide 5)
Vincent - December 9, 2024
Table of Contents