Skip to content

Identity Protection

The Identity Protection service collection provides operations for managing identity-based security across your environment. Retrieve sensor aggregates, get device details, search sensors by filter, execute GraphQL queries for entities and incidents, and manage identity protection policy rules.

LanguageLast Update
Pythonv1.6.5
PowerShellv2.2.9
Gov0.22.0
TypeScriptv0.6.0
Rustv0.7.1
Rubyv1.4.0

This service collection has code examples posted to the repository.



OperationDescription
api_preempt_proxy_post_graphql
graphql
Identity Protection GraphQL API.
delete_policy_rules
delete_policy_rules
Delete policy rules
delete_policy_rules
delete_policy_rules
Delete policy rules
get_policy_rules
get_policy_rules
Get policy rules
get_policy_rules
get_policy_rules
Get policy rules
get_policy_rules_query
query_policy_rules
Query policy rule IDs
get_policy_rules_query
query_policy_rules
Query policy rule IDs
GetSensorAggregates
get_sensor_aggregates
Get sensor aggregates as specified via json in request body.
GetSensorDetails
get_sensor_details
Get details on one or more sensors by providing device IDs in a POST body.
post_policy_rules
create_policy_rule
Create policy rule
post_policy_rules
create_policy_rule
Create policy rule
QuerySensorsByFilter
query_sensors
Search for sensors in your environment by hostname, IP, and other criteria.

Identity Protection GraphQL API.

Method POST
Route /identity-protection/combined/graphql/v1
Scope Identity Protection GraphQL: WRITE
PEP 8 graphql
body body · dictionary
Full body payload as JSON formatted dictionary.
query body · string
JSON-similar string. (GraphQL syntax)
variables body · string
variables to use for interpolation. Currently using a non-standard body payload format. Example payload:
from falconpy import IdentityProtection
falcon = IdentityProtection(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.graphql(query="string", variables="string")
print(response)
{
"errors": [
{
"code": 0,
"id": "string",
"message": "string"
}
],
"meta": {
"pagination": {
"limit": 0,
"offset": 0,
"total": 0
},
"powered_by": "string",
"query_time": 0.0,
"trace_id": "string",
"writes": {
"resources_affected": 0
}
}
}


Delete policy rules

Method DELETE
Route /identity-protection/entities/policy-rules/v1
Scope Identity Protection Policy Rules: WRITE
PEP 8 delete_policy_rules
ids query · string or list of strings
Rule IDs
parameters query · dictionary
Full query string parameters payload in JSON format. Not required when using other keywords.
from falconpy import IdentityProtection
falcon = IdentityProtection(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.delete_policy_rules(ids=id_list)
print(response)
{
"errors": [
{
"code": 0,
"id": "string",
"message": "string"
}
],
"meta": {
"pagination": {
"limit": 0,
"offset": 0,
"total": 0
},
"powered_by": "string",
"query_time": 0.0,
"trace_id": "string",
"writes": {
"resources_affected": 0
}
}
}


Delete policy rules

Method DELETE
Route /identity-protection/entities/policy-rules/v1
Scope Identity Protection Policy Rules: WRITE
PEP 8 delete_policy_rules
ids query · string or list of strings
Rule IDs
parameters query · dictionary
Full query string parameters payload in JSON format. Not required when using other keywords.
from falconpy import IdentityProtection
falcon = IdentityProtection(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.delete_policy_rules(ids=id_list)
print(response)


Get policy rules

Method GET
Route /identity-protection/entities/policy-rules/v1
Scope Identity Protection Policy Rules: READ
PEP 8 get_policy_rules
ids query · string or list of strings
Rule IDs
parameters query · dictionary
Full query string parameters payload in JSON format. Not required when using other keywords.
from falconpy import IdentityProtection
falcon = IdentityProtection(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.get_policy_rules(ids=id_list)
print(response)
{
"errors": [
{
"code": 0,
"id": "string",
"message": "string"
}
],
"meta": {
"pagination": {
"limit": 0,
"offset": 0,
"total": 0
},
"powered_by": "string",
"query_time": 0.0,
"trace_id": "string",
"writes": {
"resources_affected": 0
}
}
}


Get policy rules

Method GET
Route /identity-protection/entities/policy-rules/v1
Scope Identity Protection Policy Rules: READ
PEP 8 get_policy_rules
ids query · string or list of strings
Rule IDs
parameters query · dictionary
Full query string parameters payload in JSON format. Not required when using other keywords.
from falconpy import IdentityProtection
falcon = IdentityProtection(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.get_policy_rules(ids=id_list)
print(response)


Query policy rule IDs

Method GET
Route /identity-protection/queries/policy-rules/v1
Scope Identity Protection Policy Rules: READ
PEP 8 query_policy_rules
enabled query · boolean
Whether the rule is enabled
simulation_mode query · boolean
Whether the rule is in simulation mode
name query · string
Rule name
parameters query · dictionary
Full query string parameters payload in JSON format. Not required when using other keywords.
from falconpy import IdentityProtection
falcon = IdentityProtection(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.query_policy_rules(enabled=boolean,
simulation_mode=boolean,
name="string")
print(response)
{
"errors": [
{
"code": 0,
"id": "string",
"message": "string"
}
],
"meta": {
"pagination": {
"limit": 0,
"offset": 0,
"total": 0
},
"powered_by": "string",
"query_time": 0.0,
"trace_id": "string",
"writes": {
"resources_affected": 0
}
}
}


Query policy rule IDs

Method GET
Route /identity-protection/queries/policy-rules/v1
Scope Identity Protection Policy Rules: READ
PEP 8 query_policy_rules
enabled query · boolean
Whether the rule is enabled
simulation_mode query · boolean
Whether the rule is in simulation mode
name query · string
Rule name
parameters query · dictionary
Full query string parameters payload in JSON format. Not required when using other keywords.
from falconpy import IdentityProtection
falcon = IdentityProtection(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.query_policy_rules(enabled=boolean,
simulation_mode=boolean,
name="string")
print(response)


Get sensor aggregates as specified via json in request body.

Method POST
Route /identity-protection/aggregates/devices/GET/v1
Scope Identity Protection Entities: READ
PEP 8 get_sensor_aggregates
body body · dictionary
Full body payload as JSON formatted dictionary.
date_ranges body · array
If peforming a date range query specify the from and to date ranges. These can be in common date formats like 2019-07-18 or now.
exclude body · string
Fields to exclude.
extended_bounds body · object
field body · string
Term you want to aggregate on. If doing a date_range query, this is the date field you want to apply the date ranges to.
filter body · string
Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our FQL documentation in Falcon.
filters_spec body · object
from body · integer
include body · string
Fields to include.
interval body · string
Available values (6)
yearmonthweek
dayhourminute
max_doc_count body · integer
Maximum number of documents.
min_doc_count body · integer
Minimum number of documents.
missing body · string
name body · string
Scan name.
percents body · array
q body · string
FQL syntax.
ranges body · array
size body · integer
sort body · string
FQL syntax.
Available values (2)
_count
sort by document count
_term
sort by the string value alphabetically
sub_aggregates body · array
time_zone body · string
type body · string
Available values (10)
date_histogram
Aggregates counts on a specified time interval. Requires use of “interval” field.
date_range
Aggregates counts on custom defined date range buckets. Can include multiple ranges. (Similar to time series, but the bucket sizes are variable). Date formats to follow ISO 8601.
terms
Buckets alerts by the value of a specified field. For example, if field used is scenario, then alerts will be bucketed by the various alert scenario names.
range
Buckets alerts by specified (numeric) ranges of a specified field. For example, if doing a range aggregation on the max_severity field, the alerts will be counted by the specified ranges of severity.
cardinality
Returns the count of distinct values in a specified field.
max
Returns the maximum value of a specified field.
min
Returns the minimum value of a specified field.
avg
Returns the average value of the specified field.
sum
Returns the total sum of all values for the specified field.
percentiles
Returns the following percentiles for the specified field: 1, 5, 25, 50, 75, 95, 99.
from falconpy import IdentityProtection
falcon = IdentityProtection(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
date_ranges = [
{
"from": "string",
"to": "string"
}
]
ranges = [
{
"From": 0,
"To": 0
}
]
response = falcon.get_sensor_aggregates(date_ranges=date_ranges,
exclude="string",
field="string",
filter="string",
from=integer,
include="string",
interval="string",
max_doc_count=integer,
min_doc_count=integer,
missing="string",
name="string",
q="string",
ranges=ranges,
size=integer,
sort="string",
sub_aggregates=["string"],
time_zone="string",
type="string")
print(response)
[
{
"buckets": [],
"doc_count_error_upper_bound": 0,
"hits": {},
"name": "string",
"sum_other_doc_count": 0
}
]


Get details on one or more sensors by providing device IDs in a POST body.

Method POST
Route /identity-protection/entities/devices/GET/v1
Scope Identity Protection Entities: READ
PEP 8 get_sensor_details
body body · dictionary
Full body payload as JSON formatted dictionary.
ids body · array
Sensor ID(s) to retrieve. (Max: 5,000)
from falconpy import IdentityProtection
falcon = IdentityProtection(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.get_sensor_details(ids=id_list)
print(response)
[
{
"agent_version": "string",
"cid": "string",
"device_id": "string",
"directory_auditing": "string",
"group_policy_object": "string",
"heartbeat_time": 0,
"hostname": "string",
"idp_policy_id": "string",
"idp_policy_name": "string",
"kerberos_config": "string",
"ldap_config": "string",
"ldaps_config": "string",
"local_ip": "string",
"machine_domain": "string",
"new_enforcement_mode": "string",
"ntlm_config": "string",
"os_version": "string",
"rdp_to_dc_config": "string",
"smb_to_dc_config": "string",
"status": "string",
"status_causes": [],
"ti_enabled": "string"
}
]


Create policy rule

Method POST
Route /identity-protection/entities/policy-rules/v1
Scope Identity Protection Policy Rules: WRITE
PEP 8 create_policy_rule
body body · dictionary
Full body payload as JSON formatted dictionary.
action body · string
Action to perform.
activity body · object
Activities that trigger the policy.
destination body · object
Activity destination.
enabled body · boolean
Flag indicating if the policy rule should be enabled.
name body · string
Policy rule name.
simulation_mode body · boolean
Simulate the policy action instead of actually taking action. simulationMode will also be accepted for this argument.
simulationMode body · boolean
Simulate the policy action instead of actually taking action. simulationMode will also be accepted for this argument.
SimulationMode body · boolean
Simulate the policy action instead of actually taking action. simulationMode will also be accepted for this argument.
source_endpoint body · object
Source endpoint details. sourceEndpoint will also be accepted for this argument.
sourceEndpoint body · object
Source endpoint details. sourceEndpoint will also be accepted for this argument.
SourceEndpoint body · object
Source endpoint details. sourceEndpoint will also be accepted for this argument.
source_user body · object
Source user details. sourceUser will also be accepted for this argument.
sourceUser body · object
Source user details. sourceUser will also be accepted for this argument.
SourceUser body · object
Source user details. sourceUser will also be accepted for this argument.
trigger body · string
Policy rule trigger.
from falconpy import IdentityProtection
falcon = IdentityProtection(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
activity = {
"accessType": {
"exclude": [
"string"
],
"include": [
"string"
]
},
"accessTypeCustom": {
"exclude": [
"string"
],
"include": [
"string"
]
}
}
destination = {
"entityId": {
"exclude": [
"string"
],
"include": [
"string"
]
},
"groupMembership": {
"exclude": [
"string"
],
"include": [
"string"
]
}
}
response = falcon.create_policy_rule(action="string",
activity=activity,
destination=destination,
enabled=boolean,
name="string",
simulation_mode="string",
source_endpoint="string",
source_user="string",
trigger="string")
print(response)
{
"errors": [
{
"code": 0,
"id": "string",
"message": "string"
}
],
"meta": {
"pagination": {
"limit": 0,
"offset": 0,
"total": 0
},
"powered_by": "string",
"query_time": 0.0,
"trace_id": "string",
"writes": {
"resources_affected": 0
}
}
}


Create policy rule

Method POST
Route /identity-protection/entities/policy-rules/v1
Scope Identity Protection Policy Rules: WRITE
PEP 8 create_policy_rule
action body · string
Action to perform.
activity body · dictionary
Activities that trigger the policy.
destination body · dictionary
Activity destination.
enabled body · boolean
Flag indicating if the policy rule should be enabled.
name body · string
Policy rule name.
simulation_mode body · string
Simulate the policy action instead of actually taking action. simulationMode will also be accepted for this argument.
source_endpoint body · string
Source endpoint details. sourceEndpoint will also be accepted for this argument.
source_user body · string
Source user details. sourceUser will also be accepted for this argument.
trigger body · string
Policy rule trigger.
from falconpy import IdentityProtection
falcon = IdentityProtection(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
activity = {
"accessType": {
"exclude": [
"string"
],
"include": [
"string"
]
},
"accessTypeCustom": {
"exclude": [
"string"
],
"include": [
"string"
]
}
}
destination = {
"entityId": {
"exclude": [
"string"
],
"include": [
"string"
]
},
"groupMembership": {
"exclude": [
"string"
],
"include": [
"string"
]
}
}
response = falcon.create_policy_rule(action="string",
activity=activity,
destination=destination,
enabled=boolean,
name="string",
simulation_mode="string",
source_endpoint="string",
source_user="string",
trigger="string")
print(response)


Search for sensors in your environment by hostname, IP, and other criteria.

Method GET
Route /identity-protection/queries/devices/v1
Scope Identity Protection Entities: READ
PEP 8 query_sensors
offset query · integer
The offset to start retrieving records from
limit query · integer
The maximum records to return. [1-200]
sort query · string
The property to sort by (e.g. status.desc or hostname.asc)
filter query · string
The filter expression that should be used to limit the results.
parameters query · dictionary
Full query string parameters payload in JSON format. Not required when using other keywords.
from falconpy import IdentityProtection
falcon = IdentityProtection(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.query_sensors(filter="string",
limit=integer,
offset=integer,
sort="string")
print(response)
[
"string"
]