Implements ConnectorPlugin for Intune Graph API operations. Governed invocation: every Intune call requires an active AC and emits a Chronicle CONNECTOR_INVOKED event. Operations: list, get, compliance check, sync, lock, retire, wipe. In-memory compliance cache with configurable TTL. Conditional registration via intune_enabled setting. Signed-off-by: Tyler King <tking@guildhouse.dev>
28 lines
799 B
Python
28 lines
799 B
Python
# Copyright 2026 Guildhouse Dev
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
"""Pydantic models for Intune device management."""
|
|
|
|
from datetime import datetime
|
|
from typing import Optional
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class DeviceSummary(BaseModel):
|
|
device_id: str
|
|
device_name: str = ""
|
|
os_type: str = "" # windows, linux, macOS, android, iOS
|
|
os_version: str = ""
|
|
compliance_state: str = "" # compliant, noncompliant, unknown, configManager, ...
|
|
last_sync: Optional[datetime] = None
|
|
user_principal_name: Optional[str] = None
|
|
entra_device_id: Optional[str] = None
|
|
|
|
|
|
class ComplianceState(BaseModel):
|
|
device_id: str
|
|
compliant: bool
|
|
state: str = "" # compliant, noncompliant, configManager, ...
|
|
detail: Optional[str] = None
|
|
last_evaluated: datetime
|