microsoft / Intune-Resource-Access

Sample code and scripts for interfacing with the Intune Resource Access APIs.
MIT License
54 stars 58 forks source link

Trying to deploy S/MIME Certificate from digicert #107

Open marfoned opened 3 years ago

marfoned commented 3 years ago

Hi all, i'm using this tool to succesfully deploy a cert issued by sectigo, now i'm doing the same thing with a Digicert Certificate, once i use the command:

$userPFXObject = New-IntuneUserPfxCertificate -PathToPfxFile "C:\Users\admin.far\Desktop\Digicert.pfx" $SecureFilePassword "user@domain.com" "Microsoft Software Key Storage Provider" "PFXEncryptionKey" "smimeEncryption"

everything seems to work. but then if i try to list the certificates with Get-IntuneUserPfxCertificate this certificate is not listed.

Any suggestion on where to check?

darba commented 3 years ago

One thing missing in your message above is the call to Import-IntuneUserPfxCertificate. The "New" cmdlet creates the object and the "Import" uploads it to Intune. Without the import, it won't be returned from the "Get" command which lists the records in Intune.