< Back

Get-CCPCredential

Mon Jan 13, 2020 6:39 am

NAME Get-CCPCredential



SYNOPSIS

Use the GetPassword REST Web Service to retrieve passwords from the Central Credential Provider.





SYNTAX

Get-CCPCredential -AppID <String> [-Safe <String>] [-Folder <String>] [-Object <String>] [-UserName <String>]

[-Address <String>] [-Database <String>] [-PolicyID <String>] [-Reason <String>] [-ConnectionTimeout <Int32>]

[-WebServiceName <String>] -URL <String> [<CommonParameters>]



Get-CCPCredential -AppID <String> [-Safe <String>] [-Folder <String>] [-Object <String>] [-UserName <String>]

[-Address <String>] [-Database <String>] [-PolicyID <String>] [-Reason <String>] [-ConnectionTimeout <Int32>]

-Certificate <X509Certificate> [-WebServiceName <String>] -URL <String> [<CommonParameters>]



Get-CCPCredential -AppID <String> [-Safe <String>] [-Folder <String>] [-Object <String>] [-UserName <String>]

[-Address <String>] [-Database <String>] [-PolicyID <String>] [-Reason <String>] [-ConnectionTimeout <Int32>]

-CertificateThumbPrint <String> [-WebServiceName <String>] -URL <String> [<CommonParameters>]



Get-CCPCredential -AppID <String> [-Safe <String>] [-Folder <String>] [-Object <String>] [-UserName <String>]

[-Address <String>] [-Database <String>] [-PolicyID <String>] [-Reason <String>] [-ConnectionTimeout <Int32>]

-UseDefaultCredentials [-WebServiceName <String>] -URL <String> [<CommonParameters>]



Get-CCPCredential -AppID <String> [-Safe <String>] [-Folder <String>] [-Object <String>] [-UserName <String>]

[-Address <String>] [-Database <String>] [-PolicyID <String>] [-Reason <String>] [-ConnectionTimeout <Int32>]

-Credential <PSCredential> [-WebServiceName <String>] -URL <String> [<CommonParameters>]





DESCRIPTION

When the Central Credential Provider for Windows is published via an IIS and the Central

Credential Provider Web Service, this function can be used to retrieve credentials.

Passwords stored in the CyberArk Vault are retrieved to the Central Credential Provider, where

they can be accessed by authorized remote applications/scripts using a web service call.





PARAMETERS

-AppID <String>

Specifies the unique ID of the application issuing the password request.



Required? true

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-Safe <String>

Specifies the name of the Safe where the password is stored.



Required? false

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-Folder <String>

Specifies the name of the folder where the password is stored.



Required? false

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-Object <String>

Specifies the name of the password object to retrieve.



Required? false

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-UserName <String>

Defines search criteria according to the UserName account property.



Required? false

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-Address <String>

Defines search criteria according to the Address account property.



Required? false

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-Database <String>

Defines search criteria according to the Database account property.



Required? false

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-PolicyID <String>

Defines the format that will be used in the set PolicyID method.



Required? false

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-Reason <String>

The reason for retrieving the password. This reason will be audited in the Credential Provider audit log



Required? false

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-ConnectionTimeout <Int32>

The number of seconds that the Central Credential Provider will try to retrieve the password.

The timeout is calculated when the request is sent from the web service to the Vault and returned back

to the web service.



Required? false

Position? named

Default value 0

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-Credential <PSCredential>

Specify the credentials object if OS User authentication is required for CCP.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-UseDefaultCredentials [<SwitchParameter>]

Use the default credentials for CCP OS User authentication.



Required? true

Position? named

Default value False

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Certificate <X509Certificate>

A Certificate from a local store which is authorised to access the AIMWebService.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-CertificateThumbPrint <String>

A Certificate Thumbprint authorised to access the AIMWebService.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-WebServiceName <String>

The name the CCP WebService is configured under in IIS.

Defaults to AIMWebService



Required? false

Position? named

Default value AIMWebService

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-URL <String>

The URL for the CCP Host



Required? true

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-CCPCredential -AppID PSScript -Safe PSAccounts -Object PSPlatform-AccountName -URL

https://cyberark.yourcompany.com



Uses the PSScript App ID to retrieve password for the PSPlatform-AccountName object in the PSAccounts safe from the

https://cyberark.yourcompany.com/AIMWebService CCP Web Service.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-CCPCredential -AppID PowerShell -Safe PSAccounts -UserName svc-psProvision -WebServiceName DevAIM -URL

https://cyberark-dev.yourcompany.com



Uses the PowerShell App ID to search for and retrieve the password for the svc-psProvision account in the

PSAccounts safe

from the https://cyberark-dev.yourcompany.com/DevAIM CCP Web Service.









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>$result = Get-CCPCredential -AppID PS -Safe PS -Object PSP-AccountName -URL https://cyberark.yourcompany.com



$result.ToSecureSting()



Returns the password retrieved from CCP as a Secure String









-------------------------- EXAMPLE 4 --------------------------



PS C:\\>$result = Get-CCPCredential -AppID PS -Safe PS -Object PSP-AccountName -URL https://cyberark.yourcompany.com



$result.ToCredential()



Returns the username & password retrieved from CCP as a PSCredential object









-------------------------- EXAMPLE 5 --------------------------



PS C:\\>Get-CCPCredential -AppID PS -Safe PS -Object PSP-AccountName -URL https://cyberark.yourcompany.com

-UseDefaultCredentials



Calls Invoke-RestMethod with the UseDefaultCredentials switch to use OS User authentication









-------------------------- EXAMPLE 6 --------------------------



PS C:\\>Get-CCPCredential -AppID PS -Safe PS -Object PSP-AccountName -URL https://cyberark.yourcompany.com

-Credential $creds



Calls Invoke-RestMethod with the supplied Credentials for OS User authentication









-------------------------- EXAMPLE 7 --------------------------



PS C:\\>Get-CCPCredential -AppID PS -Safe PS -Object PSP-AccountName -URL https://cyberark.yourcompany.com

-CertificateThumbPrint $Cert_ThumbPrint



Calls Invoke-RestMethod with the supplied Certificate for Certificate authentication









-------------------------- EXAMPLE 8 --------------------------



PS C:\\>Get-CCPCredential -AppID PS -Safe PS -Object PSP-AccountName -URL https://cyberark.yourcompany.com

-Certificate $Cert



Calls Invoke-RestMethod with the supplied Certificate for Certificate authentication











RELATED LINKS