Search Remote Session Credential Permissions ​
GET /api/rscredentialpermissions
Searching for Remote Session Credential permissions 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. You must specify the Remote Session Credentials API Key which can be found on the screen Administration -> Passwordstate Administration -> System Settings -> API tab.
- CredentialID
- Description
- RemoteConnectionType
- SiteID
- SiteLocation
- UserID (UserID is the user in Passwordstate, as found on the screen Administration -> UserAccounts)
- SecurityGroupID (SecurityGroupID is the security group in Passwordstate, as found on the screen Administration -> SecurityGroups)
If UserID and SecurityGroupID are returned as both "0", this means permissions are applied for "All Users & Security Groups".
Powershell
# Search Permissions by CredentialID
$PasswordstateUrl = 'https://passwordstate/api/rscredentialpermissions/?CredentialID=<value>'
# Search Permissions by Description
$PasswordstateUrl = 'https://passwordstate/api/rscredentialpermissions/?Description=<value>'
# Search Permissions by Description and Remote Connection Type
$PasswordstateUrl = 'https://passwordstate/api/rscredentialpermissions/?Description=<value>&RemoteConnectionType=<value>'
# Search Permissions by SiteID
$PasswordstateUrl = 'https://passwordstate/api/rscredentialpermissions/?SiteID=<value>'
# Search by Permissions Site Location
$PasswordstateUrl = 'https://passwordstate/api/rscredentialpermissions/?SiteLocation=<value>'
# Search by Permissions for all Credentials By UserID i.e. which credentials does a specific user have
$PasswordstateUrl = 'https://passwordstate/api/rscredentialpermissions/?UserID=<value>'
# Search by Permissions for all Credentials By SecurityGroupID i.e. which credentials does a specific security group have
$PasswordstateUrl = 'https://passwordstate/api/rscredentialpermissions/?SecurityGroupID=<value>'
Invoke-Restmethod -Method GET -Uri $PasswordstateUrl -Header @{ "APIKey" = "<apikey>" }Json
# Response
HTTP/1.1 200
[
{
"CredentialID":"1011",
"Description":"RDP Sessions Domain Machines",
"HostName":"",
"HostNameExclude":"",
"HostType":"",
"OperatingSystems":"",
"RemoteConnectionType":"RDP",
"RemoteConnectionParameters":"",
"PasswordID":"57783",
"PasswordListID":"183",
"PasswordList":"Active Directory Accounts",
"ImageFileName":"activedirectory.png",
"TreePath":"\Infrastructure\Active Directory Accounts",
"ProvideAccessReason":"False",
"Title":"My Domain Account",
"UserName":"userxyz",
"UserID":"domain\username",
"SecurityGroupID":"0",
"AccessExpiresAt":"",
"SiteID":"0",
"SiteLocation":"Internal"
}
]