Venafi / VenafiPS

Powershell module to fully automate your Venafi TLS Protect Datacenter and Cloud platforms!
https://venafips.readthedocs.io/
Apache License 2.0
17 stars 8 forks source link

New-VenafiSession not working with -AccessToken #252

Closed stevekeever closed 5 months ago

stevekeever commented 5 months ago

Having a problem with 6.1.3 getting a session created. I store the token and am trying to use it to generate a new session. In this case, its in a PSCredential. I have tried to just send the access token as a string and get a similar error.

Environment

Full Operating System: Windows 10
VenafiPS version: 6.1.3
PowerShell version: 5.1
TLSPDC version (if applicable):  21.4

Steps to reproduce

$mysession = New-VenafiSession -Server $TPP -AccessToken $token -PassThru

Exception setting "AccessToken": "The property 'AccessToken' cannot be found on this object. Verify that the property exists and can be set." At C:\Users\C722673\Documents\Powershell Modules\VenafiPS\6.1.3\Public\New-VenafiSession.ps1:358 char:56 + elseif ($AccessToken -is [pscredential]) { $AccessToken } + CategoryInfo : NotSpecified: (:) [], SetValueInvocationException + FullyQualifiedErrorId : ExceptionWhenSetting