Search Privileged Account Credential ​
GET /winapi/privaccount
Searching for Privileged Account Credentials can be achieved via multiple criteria, as outlined by the fields below. You can search using just one field, or multiple to further narrow down the search results. The account executing this call must have the Privileged Account Credentials Security Administrator's role in Passwordstate.
- PrivilegedAccountID
- Description
- UserName
- SiteID
- SiteLocation
Powershell
# Search by PrivilegedAccountID
$PasswordstateUrl = 'https://passwordstate/winapi/privaccount/?PrivilegedAccountID=<value>'
# Search by Description
$PasswordstateUrl = 'https://passwordstate/winapi/privaccount/?Description=<value>'
# Search by UserName
$PasswordstateUrl = 'https://passwordstate/winapi/privaccount/?UserName=<value>'
# Searching by SiteID
$PasswordstateUrl = 'https://passwordstate/winapi/privaccount/?SiteID=<value>'
# Searching by SiteLocation
$PasswordstateUrl = 'https://passwordstate/winapi/privaccount/?SiteLocation=<value>'
# Search by UserName and SiteLocation
$PasswordstateUrl = 'https://passwordstate/winapi/privaccount/?UserName=<value>&SiteLocation=<value>'
Invoke-Restmethod -Method GET -Uri $PasswordstateUrl -UseDefaultCredentialsJson
# Response
HTTP/1.1 200
[
{
"PrivilegedAccountID":"7",
"Description":"AD Account for Priv Account Management",
"UserName":"domain\ps_accnt",
"PasswordID":"0",
"AccountType":"Active Directory",
"SiteID":"0",
"SiteLocation":"Internal"
}
]