title: Can't install CA certificate on Android 11 on Work Profile
body: <p>Given self-signed CA certificate file which was generated on device, I'm trying to figure out a way to install it on work profile, since the traditional way of installing CA certificates using <code>android.security.KeyChain.createInstallIntent()</code> no longer works, neither on personal profile nor work profile.</p>
  <p>I noticed that on some devices (for example, Pixel device), there is no system settings UI for installing CA certificate on work profile (only for personal profile), while other devices (for example, Samsung Galaxy S10+ and Galaxy S8+) does provide a system UI to install CA certificates on work profile.
  But since it's not available across all device manufacturers, I cannot rely on it.</p>
  <p>According to <a href="https://developer.android.com/work/versions/android-11#other" rel="nofollow noreferrer">Android Developers documentation of Android Enterprise changes in Android 11</a>, only DPC apps or apps delegated by DPC apps can install and revoke CA certificates in work profile programatically.</p>
  <p>But not all DPC apps support this API (exist in Test DPC but not in Microsoft's Intune Company Portal).</p>
  <p>I'm lost, does anybody know a way that will always work?</p>