Subject rights requests¶
A subject rights request tracks one person's access, export or deletion request
under privacy law (GDPR, CCPA) from intake to fulfilment, including the internal
due date that keeps the organisation inside the statutory window. The Graph
entry point is client.security.subject_rights_requests.
flowchart LR
C["subject_rights_requests.add()"] --> Q["request queue<br/>(status: active → closed)"]
Create a request¶
Opens a request for a data subject, with a type (export, access, delete)
and an internal due date.
request = client.security.subject_rights_requests.add(
type="export",
displayName="...",
internalDueDateTime="2026-07-05T00:00:00Z",
dataSubject=DataSubject(email=args.email),
).execute_query()
List requests¶
Reads the request queue with each request's stage — a compliance progress check.
Both scripts use app-only auth. create.py needs
SubjectRightsRequest.ReadWrite.All; list.py needs
SubjectRightsRequest.Read.All. The service must be provisioned for the tenant
otherwise the call reports HostNotFound.