class AttackSimulationRepeatOffender
A data model class representing a user in a Microsoft 365 tenant who has repeatedly fallen victim to simulated phishing attacks and security training campaigns.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/security/attacksimulations/repeat_offender.py
4 - 6
simple
Purpose
This class serves as a data transfer object (DTO) for tracking repeat offenders in Microsoft 365 attack simulation and training scenarios. It inherits from ClientValue, which is part of the Office 365 Python SDK, and is used to represent user data related to security awareness training outcomes. The class helps identify users who consistently fail to recognize simulated attacks, allowing administrators to target additional training or implement additional security measures for these high-risk users.
Source Code
class AttackSimulationRepeatOffender(ClientValue):
"""Represents a user in a tenant who has given way to attacks more than once across various attack simulation
and training campaigns."""
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
bases: Inherits from ClientValue, which is a base class in the Office 365 SDK that provides serialization/deserialization capabilities for client-side value objects used in API communications with Microsoft 365 services
Return Value
Instantiation returns an AttackSimulationRepeatOffender object that can be used to store and transfer data about users who have repeatedly failed attack simulations. The object inherits serialization methods from ClientValue for API communication.
Class Interface
Dependencies
office365-runtime
Required Imports
from office365.runtime.client_value import ClientValue
Usage Example
from office365.runtime.client_value import ClientValue
from office365.security.attack_simulation_repeat_offender import AttackSimulationRepeatOffender
# Instantiate a repeat offender object
repeat_offender = AttackSimulationRepeatOffender()
# This class is typically populated by the Office 365 SDK when querying
# attack simulation data, rather than manually instantiated
# Example of typical usage in context:
# offenders = context.security.attack_simulation.repeat_offenders.get().execute_query()
# for offender in offenders:
# print(f"User: {offender.user_principal_name}")
# print(f"Failed simulations: {offender.repeat_offence_count}")
Best Practices
- This class is primarily used as a data container and should be instantiated by the Office 365 SDK rather than manually created in most cases
- The class inherits serialization capabilities from ClientValue, so avoid overriding serialization methods unless necessary
- Use this class in conjunction with the Office 365 Security API to retrieve and analyze repeat offender data
- This is a read-only data model representing API response data; modifications to instances typically won't affect server-side data
- Ensure proper authentication and authorization before accessing attack simulation data as it contains sensitive security information
- The class follows the Office 365 SDK patterns where properties are typically defined dynamically through the ClientValue base class
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class AttackSimulationSimulationUserCoverage 77.3% similar
-
class Simulation 72.9% similar
-
class AttackSimulationRoot 70.2% similar
-
class SimulationReport_v1 68.9% similar
-
class SimulationReport 67.8% similar