Question

I am trying to install a MDM configuration profile via iPhone Configuration Utility. This is what I am doing -

  1. Build a simple mdm server in asp.net and host over SSL. (This server does nothing for now apart from listing to input requests.)
  2. Generate a p12 certificate from the asp.net server's SSL certificate
  3. Specify the url of the server in MDM configuration
  4. Set the p12 certificate in the identify of MDM profile.
  5. Install the profile

During installation I am getting the error The server certificate for "https://myservername/mdmserver/api/" is invalid.

I already tried lots of things which I found over internet but could succeed. Any kind of help will really be appreciated.

Detailed error -

NSError:
Desc   : The payload com.mycompany.test01.mdm2 could not be installed.
Sugg   : The server certificate for https://myservername/mdmserver/api is invalid.
US Desc: The payload com.mycompany.test01.mdm2 could not be installed.
US Sugg: The server certificate for https://myservername/mdmserver/api is invalid.
Domain : MCInstallationErrorDomain
Code   : 4001
Type   : MCFatalError
Params : (
"com.mycompany.test01.mdm2"
)
Was it helpful?

Solution 2

The problem is solved!

The issue was because I was using self-signed certificates.

In case anyone facing similar issues then you can check more details here

OTHER TIPS

Two problems:

1) You should include device identity in your MDM profile. It's either PKCS12 or SCEP. In the case, if you are using PKCS12, usage of server PKCS12 is wrong (because it's server PKCS12 vs device identify PKCS12). Create new cert and private key, pack them into PKCS12 and use it as device identity.

2) Most likely, you forgot to include your server certificate in MDM profile. So, iOS can't validate whether it's contacting to appropriate server or not.

There is another possibility that your server certificate is truly invalid (as example, expired or common name doesn't match "myservername"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top