Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Post /GetAllSearchAdvanced
Send a POST request to the GetAllSearchAdvanced()
method on the AccountView
object to return information about one or more accounts. The information included in the response depends on the range of account properties and parameter values included in the request.
A valid OAuth 2.0 Bearer token is required.
URL
Code Block |
---|
POST https://<FQDN_Of_Your_EmpowerID_Web_Server>/api/webui/v1/AccountView/GetAllSearchAdvanced |
Header Key/Value Pairs
Key | Value |
---|---|
Authorization | Bearer <access_token> |
X-EmpowerID-API-Key | The API key from the registered OAuth application |
Content-Type | application/json |
Request Body
The body of the request must include all parameters required by the method and the IncludedProperties
object with at least one account property.
Included Properties
Use IncludedProperties
to return one or more account properties. Example properties include PersonID
AccountID
, LastName
, FirstName
, and login
. See Person Properties below for a fuller list of properties that can be returned NetBiosName
.
Body Parameters
The GetAllSearchAdvanced()
method includes a number of parameters that must be included in the body or the request. Use parameters to filter the number of accounts returned by the endpoint.
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
columnsToSearch
The columnsToSearch
body parameter is used to return accounts meeting one or more conditions. Each condition specifies a property with a specific value to search and there can be more than one condition. For example, to return a list of accounts with belonging to the “DevDomain1” domain that are currently locked out, the value for columnsToSearch
would be set to that shown below.
"%[[][[]%<Conditions><Condition PropertyName=\"NetBiosName\" SearchValue=\"Docs-tracking\" Operator=\"EqualTo\" QuerySuffix=\" AND \" StartGroupString=\"\" EndGroupString=\"\" Index=\"0\" SearchType=\"String\"/><Condition PropertyName=\"LockedOut\" SearchValue=\"true\" Operator=\"EqualTo\" QuerySuffix=\"\" StartGroupString=\"\" EndGroupString=\"\" Index=\"1\" SearchType=\"Boolean\"/></Conditions>"
Remarks
In the above example, columnsToSearch
contains two search conditions. The API returns accounts matching both conditions. Each condition includes the PropertyName
to search, the SearchValue
to search for, an Equality Operator
, a QuerySuffix
and a SearchType
for the relevant data type.
Search Examples
The below examples demonstrate how to use IncludedProperties
, parameters, and conditions in columnsToSearch
to query the API for a list of accounts matching the search conditions. Attributes returned for each record are set by the properties specified in IncludedProperties
.
1️⃣ Set the ShowSystemAccountsOnly
parameter to 1
to return a list of system accounts.
Code Block | ||
---|---|---|
| ||
{ "IncludedProperties": [ "LogonName", "NetBiosName", "FriendlyName", "AccountOrganizationStatusFriendlyName", "AccountUsageTypeFriendlyName", "ResourceID", "AccountID", "Name", "Description", "CreatedDate", "ExpiresOn", "AccountStoreFriendlyName", ], "Parameters": { "AccountTypeID": null, "AccountUsageTypeID": null, "Disabled": null, "HideInEmpowerID": null, "IsOrphan": null, "LockedOut": null, "NeverLoggedInOnly": null, "OrgZoneID": null, "SecurityBoundaryID": null, "SecurityBoundaryTypeID": null, "ShowSystemAccountsOnly": 1, "ShowSystemBuiltInAccountsOnly": null, "accountStoreID": null, "textToSearch": null, "columnsToSearch": "%[[][[]%<Conditions/>", "pageLength": 5, "resourceTags": null, "start": 0, "totalCount": null } } |
2️⃣ Set the AccountUsageTypeID
parameter to 2
and the NeverLoggedInOnly
parameter to 1
to return Personal Privileged accounts that have never logged in to the system.
Code Block |
---|
{ "IncludedProperties": [ "LogonName", "NetBiosName", "FriendlyName", "PersonID", "EmpowerIDLogon", "AccountOrganizationStatusFriendlyName", "AccountUsageTypeFriendlyName", "DistinguishedName", "LastLogonTime", "ValidUntil", "ResourceID", "AccountID", "Name", "Description", "CreatedDate", "ExpiresOn", "MustChangePasswordAtNextLogin", "LockedOut", "CannotChangePassword", "PasswordExpires", "PasswordLastChanged", "PasswordNeverExpires", "FirstName", "LastName", "Officelocation", "Location", "AccountStoreFriendlyName", "Email", "StreetAddress", "City", "State", "ZipCode", "Country", "Company", "JobTitle", "Department", "Telephone", "MobileNumber", "AccountManagerFriendlyName", "PersonOwnerLastAttestationDate", "PersonOwnerLastResourceAttestationSnapshotID" ], "Parameters": { "AccountStoreID": null, "SecurityBoundaryID": null, "SecurityBoundaryTypeID": null, "AccountTypeID": null, "ShowSystemAccountsOnly": null, "ShowSystemBuiltInAccountsOnly": null, "AccountUsageTypeID": 2, "IsOrphan": null, "Disabled": null, "LockedOut": null, "NeverLoggedInOnly": 1, "HideInEmpowerID": null, "OrgZoneID": null, "PersonID": null, "ManagerPersonID": null, "MemberOfGroupID": null, "columnsToSearch": "%[[][[]%<Conditions/>", "textToSearch":"AdvancedSearch", "pageLength": 5, "resourceTags": null, "start": 0, "totalCount": null, } } |
3️⃣ Use columnsToSearch
to return all locked out accounts. Note the PropertyName
for the search condition is set to LockedOut
, SearchValue
is set to True
, the Operator
is set to EqualTo
and the SearchType
is Boolean
.
Code Block |
---|
{ "IncludedProperties": [ "LogonNameAccountID", "NetBiosName", "FriendlyName", "AccountOrganizationStatusFriendlyName"FirstName", "AccountUsageTypeFriendlyNameLastName", "ResourceID "LogonName", "AccountIDEmpowerIDLogon", "Name", "Description", "CreatedDate", "ExpiresOnNetBiosName", "AccountStoreFriendlyName", ], "Parameters": { "AccountStoreID": null, "SecurityBoundaryID": null, "SecurityBoundaryTypeID": null, "AccountTypeID": null, "ShowSystemAccountsOnly": null, "ShowSystemBuiltInAccountsOnly": null, "AccountUsageTypeID": null, "IsOrphan": null, "Disabled": null, "LockedOut": null, "NeverLoggedInOnly": null, "HideInEmpowerID": null, "OrgZoneID": null, "PersonID": null, "ManagerPersonID": null, "MemberOfGroupID": null, "textToSearch":"AdvancedSearch", "pageLength": 5, "resourceTags": null, "start": 0, "totalCount": null, "columnsToSearch": "%[[][[]%<Conditions><Condition PropertyName=\"LockedOut\" SearchValue=\"true\" Operator=\"EqualTo\" QuerySuffix=\"\" StartGroupString=\"\" EndGroupString=\"\" Index=\"0\" SearchType=\"Boolean\"/></Conditions>" } } |
4️⃣ Set the MemberOfGroupID
parameter to the GUID of a specific group to return accounts that are members of the group
Code Block |
---|
{ "IncludedProperties": [ "LogonName", "NetBiosName", "FriendlyName", "AccountOrganizationStatusFriendlyName", "AccountUsageTypeFriendlyName", "ResourceID", "AccountID", "Name", "Description", "CreatedDate", "ExpiresOn", "AccountStoreFriendlyName", ], "Parameters": { "AccountStoreID": null, "SecurityBoundaryID": null, "SecurityBoundaryTypeID": null, "AccountTypeID": null, "ShowSystemAccountsOnly": null, "ShowSystemBuiltInAccountsOnly": null, "AccountUsageTypeID": null, "IsOrphan": null, "Disabled": null, "LockedOut": null, "NeverLoggedInOnly": null, "HideInEmpowerID": null, "OrgZoneID": null, "PersonID": null, "ManagerPersonID": null, "MemberOfGroupID": "4E375004-5E6F-415D-B049-4A112C100D12", "textToSearch": null, "pageLength": 5, "resourceTags": null, "start": 0, "totalCount": null "columnsToSearch": "%[[][[]%<Conditions/>" } } |
SearchTerms
Each identity object in the EmpowerID Identity Warehouse has a SearchTerms
property with a specific set of search values that can used to return all objects matching those values. For accounts, SearchTerms
encompass the Name
, FriendlyName
, Email
, FirstName
, LastName
, LogonName
, and UserPrincipalName
properties. When used, the API returns all accounts where the specified search value finds a match in any of those properties. For example, if the search value is set to “Rogers”, the API would return all the following accounts
Any account with a match in the name
Any account with a match in the friendly name
Any account with a match in the first name
Any account with a match in the last name
Any account with a match in the logon name
Any account with a match in the email address
Any account with a match in the User Principal Name
The following examples illustrate how to use SearchTerms
to return a subset of accounts:
1️⃣ Use SearchTerms
to return the Account ID, friendly name, first name, last name, Logon name, EmpowerID Logon, NetBiosName, email address and account manager friendly name for all accounts where the search value is set to "rogers"
Code Block |
---|
{ "IncludedProperties": [ "AccountID", "FriendlyName", "FirstName", "LastName", "LogonName", "EmpowerIDLogon", "NetBiosName", "Email", "AccountManagerFriendlyName" ], "Parameters": { "AccountTypeID": null, "AccountUsageTypeID": null, "Disabled": null, "HideInEmpowerID": null, "IsOrphan": null, "LockedOut": null, "NeverLoggedInOnly": null, "OrgZoneID": null, "SecurityBoundaryID": null, "SecurityBoundaryTypeID": null, "ShowSystemAccountsOnly": null, "ShowSystemBuiltInAccountsOnly": null, "accountStoreID": null, "textToSearch":"AdvancedSearch", "pageLength": 5, "resourceTags": null, "start": 0, "totalCount": null, "columnsToSearch":"%[[][[]%<Conditions><Condition PropertyName=\"SearchTerms\" SearchValue=\"rogers\" Operator=\"EqualTo\" QuerySuffix=\"\" StartGroupString=\"\" EndGroupString=\"\" Index=\"0\" SearchType=\"String\"/></Conditions>" } } |
The response includes all people matching the search value. Note the properties where the match occurs.
Code Block |
---|
{ "Tags": [], "Data": [ { "AccountID": 7598177, "FriendlyName": "Steve Rogers", "FirstName": null, "LastName": null, "LogonName": "steve.rogers", "EmpowerIDLogon": null, "NetBiosName": "CALDAP-NEW2", "Email": null, "AccountManagerFriendlyName": null }, { "AccountID": 474585, "FriendlyName": "RDice", "FirstName": "Robert", "LastName": "Dice", "LogonName": "0xbb25b643614a1b40b1d63f935aa08c62", "EmpowerIDLogon": null, "NetBiosName": "DEVDOMAIN1", "Email": "bdice@rogers.com", "AccountManagerFriendlyName": null }, { "AccountID": 478601, "FriendlyName": "RDice", "FirstName": "Robert", "LastName": "Dice", "LogonName": "0xe419fc6d9da1b24a98d112175396ac6b", "EmpowerIDLogon": null, "NetBiosName": "DEVDOMAIN1", "Email": "bdice@rogers.com", "AccountManagerFriendlyName": null }, { "AccountID": 490102, "FriendlyName": "RDice", "FirstName": "Robert", "LastName": "Dice", "LogonName": "0x658a5369fba3d249ace199425fd428e9", "EmpowerIDLogon": null, "NetBiosName": "DEVDOMAIN1", "Email": "bdice@rogers.com", "AccountManagerFriendlyName": null }, { "AccountID": 484459, "FriendlyName": "Mindi Idell Rogers", "FirstName": "atinder", "LastName": "IdellRogers", "LogonName": "Mindi.IdellRogers", "EmpowerIDLogon": "Mindi.IdellRogers", "NetBiosName": "DEVDOMAIN1", "Email": "Mindi.IdellRogers@omd.com", "AccountManagerFriendlyName": null } ], "OutParameters": [ { "Name": "totalCount", "Value": 1150 } ] } |
2️⃣ Return all people belonging to the “CALDAP-NEW2” domain with a SearchTerm
match equal to "Steve."
Code Block |
---|
{ "IncludedProperties": [ "AccountID", "FriendlyName", "FirstName", "LastName", "LogonName", "EmpowerIDLogon", "NetBiosName", "Email", "AccountManagerFriendlyName" ], "Parameters": { "AccountTypeID": null, "AccountUsageTypeID": null, "Disabled": null, "HideInEmpowerID": null, "IsOrphan": null, "LockedOut": null, "NeverLoggedInOnly": null, "OrgZoneID": null, "SecurityBoundaryID": null, "SecurityBoundaryTypeID": null, "ShowSystemAccountsOnly": null, "ShowSystemBuiltInAccountsOnly": null, "accountStoreID": null, "textToSearch":"AdvancedSearch", "pageLength": 5, "resourceTags": null, "start": 0, "totalCount": null, "columnsToSearch":"%[[][[]%<Conditions><Condition PropertyName=\"SearchTerms\" SearchValue=\"rogers\" Operator=\"EqualTo\" QuerySuffix=\" AND \" StartGroupString=\"\" EndGroupString=\"\" Index=\"0\" SearchType=\"String\"/> <Condition PropertyName=\"NetBiosName\" SearchValue=\"CALDAP-NEW2\" Operator=\"EqualTo\" QuerySuffix=\"\" StartGroupString=\"\" EndGroupString=\"\" Index=\"0\" SearchType=\"String\"/></Conditions>" } } |
Sample Responses
Tabs macro | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
[{"label":"200","id":"1","content":{"version":1,"type":"doc","content":[{"type":"codeBlock","attrs":{"language":"json"},"content":[{"type":"text","text":" {\r\n \"Tags\": [],\r\n \"Data\": [\r\n {\r\n \"LogonName\": \"F6C48859-944D-4681-84ED-0102E04A5A7E\",\r\n \"NetBiosName\": \"EIDApTenant\",\r\n \"FriendlyName\": \"Microsoft Cloud App Security\",\r\n \"AccountOrganizationStatusFriendlyName\": \"Active\",\r\n \"AccountUsageTypeFriendlyName\": \"Personal Standard\",\r\n \"ResourceID\": 1475848,\r\n \"AccountID\": 1770969,\r\n \"Name\": \"Microsoft Cloud App Security\",\r\n \"Description\": \"Microsoft Cloud App Security\",\r\n \"CreatedDate\": \"2021-08-02T11:31:56.043\",\r\n \"ExpiresOn\": \"1900-01-01T00:00:00\",\r\n \"AccountStoreFriendlyName\": \"EIDApTenant\"\r\n },\r\n {\r\n \"LogonName\": \"FCAAD45A-B48C-4913-BF51-01081FBFCE1E\",\r\n \"NetBiosName\": \"EIDApTenant\",\r\n \"FriendlyName\": \"Microsoft Azure Alerts Management\",\r\n \"AccountOrganizationStatusFriendlyName\": \"Active\",\r\n \"AccountUsageTypeFriendlyName\": \"Personal Standard\",\r\n \"ResourceID\": 1475849,\r\n \"AccountID\": 1770970,\r\n \"Name\": \"Microsoft Azure Alerts Management\",\r\n \"Description\": \"Microsoft Azure Alerts Management\",\r\n \"CreatedDate\": \"2021-08-02T11:31:56.043\",\r\n \"ExpiresOn\": \"1900-01-01T00:00:00\",\r\n \"AccountStoreFriendlyName\": \"EIDApTenant\"\r\n },\r\n {\r\n \"LogonName\": \"19D1D2BF-40E3-4850-97A1-0147B94D382E\",\r\n \"NetBiosName\": \"EIDApTenant\",\r\n \"FriendlyName\": \"Azure AD Identity Governance\",\r\n \"AccountOrganizationStatusFriendlyName\": \"Active\",\r\n \"AccountUsageTypeFriendlyName\": \"Personal Standard\",\r\n \"ResourceID\": 1475850,\r\n \"AccountID\": 1770971,\r\n \"Name\": \"Azure AD Identity Governance\",\r\n \"Description\": \"Azure AD Identity Governance\",\r\n \"CreatedDate\": \"2021-08-02T11:31:56.043\",\r\n \"ExpiresOn\": \"1900-01-01T00:00:00\",\r\n \"AccountStoreFriendlyName\": \"EIDApTenant\"\r\n },\r\n {\r\n \"LogonName\": \"DF2D22DC-649F-439C-A8C3-029F489CAD69\",\r\n \"NetBiosName\": \"EIDApTenant\",\r\n \"FriendlyName\": \"OfficeClientService\",\r\n \"AccountOrganizationStatusFriendlyName\": \"Active\",\r\n \"AccountUsageTypeFriendlyName\": \"Personal Standard\",\r\n \"ResourceID\": 1475851,\r\n \"AccountID\": 1770972,\r\n \"Name\": \"OfficeClientService\",\r\n \"Description\": \"OfficeClientService\",\r\n \"CreatedDate\": \"2021-08-02T11:31:56.043\",\r\n \"ExpiresOn\": \"1900-01-01T00:00:00\",\r\n \"AccountStoreFriendlyName\": \"EIDApTenant\"\r\n },\r\n {\r\n \"LogonName\": \"E907C818-74BA-480A-9D96-0310CF06B3EF\",\r\n \"NetBiosName\": \"EIDApTenant\",\r\n \"FriendlyName\": \"Azure Marketplace Container Management API\",\r\n \"AccountOrganizationStatusFriendlyName\": \"Active\",\r\n \"AccountUsageTypeFriendlyName\": \"Personal Standard\",\r\n \"ResourceID\": 1475852,\r\n \"AccountID\": 1770973,\r\n \"Name\": \"Azure Marketplace Container Management API\",\r\n \"Description\": \"Azure Marketplace Container Management API\",\r\n \"CreatedDate\": \"2021-08-02T11:31:56.043\",\r\n \"ExpiresOn\": \"1900-01-01T00:00:00\",\r\n \"AccountStoreFriendlyName\": \"EIDApTenant\"\r\n }\r\n ],\r\n \"OutParameters\": [\r\n {\r\n \"Name\": \"totalCount\",\r\n \"Value\": 2924\r\n }\r\n ]\r\n}"}]},{"type":"paragraph","content":[]}]},"icon":"bootstrap/FillCircleFill"},{"label":"401","id":"2","content":{"version":1,"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"This error occurs when there is an issue with the access token."}]},{"type":"paragraph","content":[]}]},"icon":"bootstrap/FillCircleFill"},{"label":"500","id":"6a16m5mmd","content":{"version":1,"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"This error indicates that the API call included an invalid parameter."}]},{"type":"codeBlock","attrs":{"language":"json"},"content":[{"type":"text","text":"{\n {\n \"Message\": \"An error has occurred.\",\r\n \"ExceptionMessage\": \"The given key was not present in the dictionary.\"\n}"}]},{"type":"paragraph","content":[]}]},"icon":"bootstrap/FillCircleFill"}] |
Page Properties | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Account PropertiesThe below table includes Account Properties that can be added to
|
Div | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
IN THIS ARTICLE
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|