Closed jduban closed 4 years ago
Thanks for reporting this @jduban
Certificate
parameter now available in Get-CCPCredential
.
Published to the PowerShell Gallery, and the master branch.
My pleasure. Thanks for turning it around so quickly.
From: Pete Maan [mailto:notifications@github.com] Sent: Thursday, December 12, 2019 1:55 PM To: pspete/CredentialRetriever CredentialRetriever@noreply.github.com Cc: John Duban John_Duban@ajg.com; Mention mention@noreply.github.com Subject: Re: [pspete/CredentialRetriever] Enhancement Request - Add the -certificate paramater as an option to Get-CCPCredential (#9)
[EXTERNAL]
Thanks for reporting this @jdubanhttps://github.com/jduban Certificate parameter now available in Get-CCPCredential. Published to the PowerShell Gallery, and the master branch.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/pspete/CredentialRetriever/issues/9?email_source=notifications&email_token=AN7EAPAQV26WE2WOSJ6W2ZTQYKJH5A5CNFSM4JZXU6O2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGX2SUA#issuecomment-565160272, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AN7EAPGDROVA6YV5QBYC6L3QYKJH5ANCNFSM4JZXU6OQ.
This is an enhancement request.
Your Environment
Expected Behaviour
Current Behaviour
Possible Solution
Steps to Reproduce (for bug reports)
1 .
2 .
3 .
4 .
Sample Output
1 . When the client certificate exists within the local users cert store, the get-ccpcredential call completes
2 . The certificate is moved from the local users cert store into the local machine cert store, the same get-ccpcredential call fails
3 . Call Invoke-RestMethod directly using all of the same parameters but replacing -certificatethumbprint w/ -certificate
Context
Allow client certificates stored within the localmachine cert store to be used for authentication when calling get-ccpcredential. One of our company's IT staff members developed a powershell script that leverages Get-CCPCCPCredential & the -certificatethumbprint parameter. He'd added the client certificate to his cert store and encountered no issues when testing interactively. He next created a scheduled job that launched the powershell script using the system account. The scheduled job failed to complete when the script was unable to retrieve the certificate. Adding the certifcate to the localmachine cert store made no difference. Once the powershell script was modified to call Invoke-RestMethod directly using the -Certificate parameter, the scheduled job was able to complete successfully.