<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z00007hZ4KvCAKOkta Classic EngineDevices and MobilityAnswered2025-02-05T09:01:38.000Z2022-06-07T18:43:27.000Z2022-08-09T17:32:58.000Z

KevinL.31090 (Customer) asked a question.

(Okta Device Trust Enrollment) ERROR: Failed to import certificate into keychainCommand

hey there, we are getting a slew of errors recently on enrolling devices into device trust. they pretty much all end with;

 

"ERROR: Failed to import certificate into keychainCommand '['launchctl', 'asuser', '502', 'sudo', '-u', 'kyu', 'security', 'import', '/Users/kyu/tmpOktaCert.p12', '-x', '-A', '-k', '/Users/kyu/Library/Keychains/okta.keychain', '-P', '']' returned non-zero exit status 1.

ERROR: Failed to enroll!!"

 

I have tried to search to see if could find anyone else with this issue but haven't really seen anything. Would love some help from Okta on this one since we are using the scripts provided in their device trust guide.


  • flaviu.vrinceanu1.5628408972654734E12 (Customer Success Service Delivery)

    Hi @KevinL.31090 (Customer)​,

     

    Thank you for posting on the Okta community page!

     

    I have done some research and this error might appear when using an older version of the script, therefore I would advise to check if you are running the latest script and if not, I would recommend to download the newest version and see if the issue is still occurring.

     

    I hope the above information is useful!

    Expand Post
    Selected as Best
  • flaviu.vrinceanu1.5628408972654734E12 (Customer Success Service Delivery)

    Hi @KevinL.31090 (Customer)​,

     

    Thank you for posting on the Okta community page!

     

    I have done some research and this error might appear when using an older version of the script, therefore I would advise to check if you are running the latest script and if not, I would recommend to download the newest version and see if the issue is still occurring.

     

    I hope the above information is useful!

    Expand Post
    Selected as Best
  • nfxn5 (nfxn5)

    Hi All,

     

    Kindly help me with this, does anyone have a fix for this, we are seeing multiple macs are getting this Maximum enrollment limit of 5 certificates for a device is reached error.

     

    how can i fix this issue.

    Expand Post
    • KevinL.31090 (Customer)

      that means you are enrolling the same machine multiple times. you probably need to take a look at your policy and likely is a loop somewhere.

  • nfxn5 (nfxn5)

    I'm currently seeing the following error message, could you please let me know how to proceed with this

     

    https://example.okta.com/api/internal/device-trust/ca/v1/enroll/macos']' returned non-zero exit status 6.

    ERROR: Failed to enroll!!

     

    ERROR: Failed to get server metadata : Command '['launchctl', 'asuser', '504', 'sudo', '-u', 'test', 'curl', '-sS', '-X', 'GET', '-H', 'User-Agent: Okta Device Registration Task/1.3.3 (Macintosh; arm64 Mac OS X 12_5)', 'https://example.okta.com/api/internal/v1/device-trust/metadata?platform=macos']' returned non-zero exit status 6.

    Expand Post
    • KevinL.31090 (Customer)

      this was answered previously up above, try to change the version of the script you are running and download the latest one. after I had the most up-to-date version, this went away.

This question is closed.
Loading
(Okta Device Trust Enrollment) ERROR: Failed to import certificate into keychainCommand