# Tasks: Intune RBAC Backup (Role Definitions + Assignments) (030)

**Branch**: `feat/030-intune-rbac-backup`  
**Date**: 2026-01-04  
**Input**: [spec.md](./spec.md), [plan.md](./plan.md)

## Phase 1: Setup
- [x] T001 Create spec/plan/tasks and checklist.

## Phase 2: Research & Design
- [ ] T002 Confirm Graph endpoints, permissions, and payload shape for role definitions/assignments.
- [ ] T003 Decide whether RBAC objects are policy types or foundation types.
- [ ] T004 Define preview dependency report rules and what blocks execution.

## Phase 3: Tests (TDD)
- [ ] T005 Add sync test importing RBAC objects (if modeled as policy types).
- [ ] T006 Add backup snapshot test for role definitions/assignments.
- [ ] T007 Add restore preview test that reports missing dependencies and blocks execution.

## Phase 4: Implementation
- [ ] T008 Add RBAC types to `config/tenantpilot.php` (restore mode preview-only).
- [ ] T009 Add graph contracts in `config/graph_contracts.php`.
- [ ] T010 Implement snapshot capture and safe normalized display.
- [ ] T011 Implement restore preview dependency report.

## Phase 5: Verification
- [ ] T012 Run targeted tests.
- [ ] T013 Run Pint (`./vendor/bin/pint --dirty`).

