Good Afternoon Everyone,
I'm currently trying to remove certificates that were installed by our old MDM system via the API as they're causing issues with Exchange Email configuration.
I'm getting an error that appears to be from MobiControl rather than a generic Rest API error but I can't find anything about it in any MobiControl documentation.
The error is:
Invoke-restmethod : {
"$type": "ErrorDetails",
"ErrorCode": 3500,
"Message": "Certificate action failed.",
"Data": [],
"HelpLink": null
}
The script I'm running is:
$MCFQDN = "https://SERVERURL/mobicontrol/api/devices/$DeviceId/certificates/$CertificateID/actions"
$Body = @{
"ActionKind" = "Revoke"
}
$Header = @{
Authorization = "Bearer $token"
}
try
{
$response = Invoke-restmethod -Uri $MCFQDN -Method POST -Headers $Header -Body (ConvertTo-Json $Body) -ContentType "application/json"
}
catch
{
$($_.Exception.Message)
}
Does anyone have any idea what the issue might be?
I'm tried removing a certificate managed by MobiControl as well and got the same error.
Thanks!