AD Object

Methods described in this section relate to the ad object API. These methods can be accessed at TenableIE.ad_object.

class ADObjectAPI(api: APISession)[source]
details(directory_id: str, infrastructure_id: str, ad_object_id: str) Dict[source]

Retrieves the details of a specific AD object.

Parameters:
  • directory_id (str) – The directory instance identifier.

  • infrastructure_id (str) – The infrastructure instance identifier.

  • ad_object_id (str) – The AD Object identifier.

Returns:

The AD object.

Return type:

dict

Examples

>>> tie.ad_object.details(
...     directory_id='1',
...     infrastructure_id='1',
...     ad_object_id='1'
...     )
details_by_event(directory_id: str, infrastructure_id: str, ad_object_id: str, event_id: str) Dict[source]

Retrieves the details of a specific AD object.

Parameters:
  • directory_id (str) – The directory instance identifier.

  • infrastructure_id (str) – The infrastructure instance identifier.

  • ad_object_id (str) – The AD Object identifier.

  • event_id (str) – The event identifier.

Returns:

The AD object.

Return type:

dict

Examples

>>> tie.ad_object.details_by_event(
...     directory_id='1',
...     infrastructure_id='1',
...     ad_object_id='1',
...     event_id='1'
...     )
details_by_profile_and_checker(profile_id: str, checker_id: str, ad_object_id: str) Dict[source]

Retrieves an AD object details by id that have deviances for a specific profile and checker

Parameters:
  • profile_id (str) – The profile instance identifier.

  • checker_id (str) – The checker instance identifier.

  • ad_object_id (str) – The AD Object identifier.

Returns:

The AD object.

Return type:

dict

Examples

>>> tie.ad_object.details_by_profile_and_checker(
...     profile_id='1',
...     checker_id='1',
...     ad_object_id='1'
...     )
get_changes(directory_id: str, infrastructure_id: str, ad_object_id: str, event_id: str, **kwargs) List[Dict][source]

Get the AD object changes between a given event and event which precedes it.

Parameters:
  • directory_id (str) – The directory instance identifier.

  • infrastructure_id (str) – The infrastructure instance identifier.

  • ad_object_id (str) – The AD Object identifier.

  • event_id (str) – The event identifier.

  • wanted_values (optional, list[str]) – Which values user wants to include. before to include the values just before the event, after to include the values just after the event or current to include the current values.

Returns:

The list of AD objects.

Return type:

list[dict]

Examples

>>> tie.ad_object.get_changes(
...     directory_id='1',
...     infrastructure_id='1',
...     ad_object_id='1',
...     event_id='1',
...     wanted_values=['current', 'after']
...     )
search_all(profile_id: str, checker_id: str, expression: Mapping, directories: List[int], reasons: List[int], show_ignored: bool, **kwargs) ADObjectIterator[source]

Search all AD objects having deviances by profile by checker

Parameters:
  • profile_id (str) – The profile instance identifier.

  • checker_id (str) – The checker instance identifier.

  • expression (mapping) – An object describing a filter for searched items.

  • directories (list[int]) – The list of directory instance identifiers.

  • reasons (list[int]) – The list of reasons identifiers.

  • show_ignored (bool) – Whether AD Object that only have ignored deviances should be included?

  • date_start (optional, str) – The date after which the AD object deviances should have been emitted.

  • date_end (optional, str) – The date before which the AD object deviances should have been emitted.

  • page (optional, int) – The page number user wants to retrieve.

  • per_page (optional, int) – The number of records per page user wants to retrieve.

  • max_items (optional, int) – The maximum number of records to return before stopping iteration.

  • max_pages (optional, int) – The maximum number of pages to request before throwing stopping iteration.

Returns:

An iterator that handles the page management of the requested records.

Return type:

ADObjectIterator

Examples

>>> for ado in tie.ad_object.search_all(
...     profile_id='1',
...     checker_id='1',
...     show_ignored=False,
...     reasons=[1, 2],
...     directories=[1],
...     expression={'OR': [{
...         'whencreated': '2021-07-29T12:27:50.0000000Z'
...     }]},
...     date_end='2022-12-31T18:30:00.000Z',
...     date_start='2021-12-31T18:30:00.000Z',
...     page=1,
...     per_page=20,
...     max_pages=10,
...     max_items=200
...     ):
...     pprint(ado)