title: The identity certificate for mdm profile could not be found
body: <p>I was trying to develop a MDM solution for iOS and I would like to test MDM with both methods of distributing device identity via PKCS12 and SCEP. Currently I am doing it using PKCS12, so here is what I am doing:</p>
  
  <ol>
  <li>Send a Profile Service profile to the device asking its device id, IMEI, Version etc.</li>
  <li>Device responds with the requested attribute - signed using the Apple Provided Certificate. </li>
  <li>I now issue a PKCS12 certificate to the device using the credentials payload.</li>
  <li>Device responds again with its attributes - this time signed using the above certificate.</li>
  <li>I deliver an MDM payload setting the IdentityCertificateUUID to the payload UUID of the certificate issued in step 3. </li>
  </ol>
  
  <p>I get profile could not be installed. Upon examining the logs, I found out the error The identity certificate for mdm profile com.mdm.xyz could not be found. </p>
  
  <p>If at Step 5, I issue the MDM profile with a new certificaate included in the payload everything works. I am not sure if this is the right way to issue another certificate. I was thinking to utilize the same certificate issued at Step 3.</p>
  
  <p>I think I am doing something wrong here and this may not be the correct way. Any help would be much appreciated. Thanks.</p>