/lighthouse-health:lighthouse-healthfrom lighthouse-health
Provides deep expertise in Microsoft 365 Lighthouse multi-tenant management for MSPs/CSPs, covering tenant health scoring, GDAP delegated admin, security baselines, MFA coverage, device compliance, risky users, and remediation planning via the Lighthouse beta Graph API.
Ships in lighthouse-health. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill provides comprehensive knowledge for managing multiple Microsoft 365 customer tenants via Lighthouse, with focus on health scoring, GDAP relationship management, and remediation planning for MSPs/CSPs.
docs/integration-context.md| Workflow | tenantId | subscriptionId | environmentCloud | principalType | scopesOrRoles |
|---|---|---|---|---|---|
| Multi-tenant health scoring and remediation | required (partner + customer) | optional | AzureCloud* | delegated-user | DelegatedAdminRelationship.Read.All, Directory.Read.All, AuditLog.Read.All |
* Use sovereign cloud values from the canonical contract when applicable.
Fail fast before scanning tenants when required context is missing or invalid. Redact partner/customer IDs in outputs.
https://graph.microsoft.com/beta/tenantRelationships/managedTenants
All Lighthouse endpoints below are relative to this base URL. GDAP endpoints use a different base path.
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /tenants | List all managed tenants |
| GET | /tenants/{tenantId} | Get specific tenant details |
| GET | /tenantsDetailedInformation | Detailed tenant info (contacts, industry) |
| GET | /tenantsCustomizedInformation | Partner-customized tenant metadata |
| PATCH | /tenantsCustomizedInformation/{tenantId} | Update partner metadata for tenant |
| GET | /tenantTags | List tenant tags |
| POST | /tenantTags | Create tenant tag |
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /managementTemplates | List baseline configuration templates |
| GET | /managementTemplates/{id} | Get template details |
| GET | /managementTemplateSteps | List steps within templates |
| GET | /managementTemplateStepVersions | Get step version details |
| GET | /managementTemplateStepTenantSummaries | Deployment status per tenant |
| GET | /managementActions | List management actions |
| GET | /managementActionTenantDeploymentStatuses | Action deployment status per tenant |
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /credentialUserRegistrationsSummaries | MFA registration summaries per tenant |
| GET | /conditionalAccessPolicyCoverages | Conditional access policy deployment |
| GET | /managedTenantAlertRules | Alert rules across tenants |
| GET | /managedTenantAlerts | Active alerts |
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /managedDeviceCompliances | Device compliance across tenants |
| GET | /managedDeviceComplianceTrends | Compliance trends over time |
| GET | /windowsProtectionStates | Windows security status |
| GET | /windowsDeviceMalwareStates | Malware detection across tenants |
| GET | /cloudPcOverview | Cloud PC health (if applicable) |
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /riskyUsers | Risky users across managed tenants |
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /tenantRelationships/delegatedAdminRelationships | List all GDAP relationships |
| GET | /tenantRelationships/delegatedAdminRelationships/{id} | Get relationship details |
| POST | /tenantRelationships/delegatedAdminRelationships | Create GDAP relationship |
| PATCH | /tenantRelationships/delegatedAdminRelationships/{id} | Update relationship |
| POST | /tenantRelationships/delegatedAdminRelationships/{id}/accessAssignments | Assign roles |
| GET | /tenantRelationships/delegatedAdminRelationships/{id}/accessAssignments | List role assignments |
Base URL for GDAP: https://graph.microsoft.com/v1.0
{
"value": [
{
"id": "customer-tenant-id_summary",
"tenantId": "customer-tenant-id",
"tenantDisplayName": "Contoso Customer",
"totalUserCount": 150,
"mfaRegisteredUserCount": 142,
"mfaExcludedUserCount": 3,
"securityDefaultsEnabled": false,
"mfaConditionalAccessPolicyState": "enabled",
"adminsMfaRegisteredCount": 8,
"adminsMfaNotRegisteredCount": 0,
"adminsCount": 8,
"lastRefreshedDateTime": "2026-02-28T12:00:00Z"
}
]
}
| Metric | Green | Yellow | Red |
|---|---|---|---|
| MFA coverage | > 95% | 80-95% | < 80% |
| Admin MFA | 100% | 90-99% | < 90% |
| Legacy auth blocked | Yes | Partial | No |
| Conditional Access policies | >= 3 core | 1-2 | None |
| Security defaults | Enabled or CA | — | Disabled + no CA |
| Risky users addressed | 0 active | 1-3 active | > 3 active |
| Metric | Green | Yellow | Red |
|---|---|---|---|
| Stale accounts (90+ days) | 0 | 1-5 | > 5 |
| Inactive accounts (30+ days) | < 5% | 5-15% | > 15% |
| Guest accounts not reviewed | 0 | 1-10 | > 10 |
| Disabled accounts with licenses | 0 | 1-3 | > 3 |
| Metric | Green | Yellow | Red |
|---|---|---|---|
| Device compliance rate | > 95% | 80-95% | < 80% |
| Windows protection active | > 95% | 80-95% | < 80% |
| Malware detections (30 days) | 0 | 1-5 | > 5 |
| Encryption enabled | > 95% | 80-95% | < 80% |
| Metric | Green | Yellow | Red |
|---|---|---|---|
| Unused licenses | < 5% | 5-15% | > 15% |
| Over-provisioned SKUs | 0 | 1-2 | > 2 |
| License assignment errors | 0 | 1-3 | > 3 |
| Role | Purpose | Role Template ID |
|---|---|---|
| Security Reader | Read security posture, sign-in logs | 5d6b6bb7-de71-4623-b4af-96380a352509 |
| Global Reader | Read tenant configuration | f2ef992c-3afb-46b9-b7cf-a126ee74c451 |
| Reports Reader | Access usage reports | 4a5d8f65-41da-4de4-8968-e035b65339cf |
| User Administrator | User lifecycle queries | fe930be7-5e62-47db-91af-98c3a49a38b1 |
| Security Administrator | Security settings, risky users | 194ae4cb-b126-40b2-bd5b-6091b380977d |
GET https://graph.microsoft.com/v1.0/tenantRelationships/delegatedAdminRelationships
?$filter=status eq 'active'
&$select=id,displayName,customer,accessDetails,status,duration,autoExtendDuration,endDateTime
&$orderby=endDateTime asc
| Status | Description |
|---|---|
active | Relationship is active and roles can be exercised |
expiring | Approaching expiration date |
expired | Relationship has expired — roles are revoked |
terminated | Manually terminated by either party |
approvalPending | Customer has not yet approved |
{
"displayName": "Contoso MSP - Security Management",
"duration": "P730D",
"autoExtendDuration": "P180D",
"customer": {
"tenantId": "customer-tenant-id"
},
"accessDetails": {
"unifiedRoles": [
{ "roleDefinitionId": "5d6b6bb7-de71-4623-b4af-96380a352509" },
{ "roleDefinitionId": "f2ef992c-3afb-46b9-b7cf-a126ee74c451" }
]
}
}
Lighthouse operations use the partner tenant credentials with GDAP:
import { ClientSecretCredential } from "@azure/identity";
import { Client } from "@microsoft/microsoft-graph-client";
import { TokenCredentialAuthenticationProvider } from
"@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials";
const credential = new ClientSecretCredential(partnerTenantId, clientId, clientSecret);
const authProvider = new TokenCredentialAuthenticationProvider(credential, {
scopes: ["https://graph.microsoft.com/.default"]
});
const client = Client.initWithMiddleware({ authProvider });
// Access customer tenant data via Lighthouse API
const tenants = await client.api(
"/tenantRelationships/managedTenants/tenants"
).get();
| Operation | Permission / Role |
|---|---|
| List managed tenants | ManagedTenants.Read.All |
| Read MFA summaries | ManagedTenants.Read.All |
| Read device compliance | ManagedTenants.Read.All |
| Manage baselines | ManagedTenants.ReadWrite.All |
| Manage tenant tags | ManagedTenants.ReadWrite.All |
| GDAP relationships | DelegatedAdminRelationship.ReadWrite.All |
| GDAP role assignments | DelegatedAdminRelationship.ReadWrite.All |
| Risky users (per tenant) | Security Reader GDAP role in customer tenant |
| Status Code | Meaning | Common Cause |
|---|---|---|
| 400 Bad Request | Malformed request | Invalid OData filter, missing required fields |
| 401 Unauthorized | Authentication failure | Expired token, wrong tenant context |
| 403 Forbidden | Insufficient permissions | GDAP relationship expired or missing required role |
| 404 Not Found | Tenant not onboarded | Customer tenant not onboarded to Lighthouse |
| 409 Conflict | Operation conflict | GDAP relationship already exists for this customer |
| 429 Too Many Requests | Throttled | Implement exponential backoff with Retry-After header |
# MFA summaries for a specific tenant
/credentialUserRegistrationsSummaries?$filter=tenantId eq '{tenantId}'
# Tenants with low MFA coverage (custom calculation from response)
/credentialUserRegistrationsSummaries?$orderby=mfaRegisteredUserCount asc
# Device compliance for a specific tenant
/managedDeviceCompliances?$filter=tenantId eq '{tenantId}'
# Active alerts ordered by severity
/managedTenantAlerts?$filter=status eq 'active'&$orderby=severity desc
# GDAP relationships expiring soon
/tenantRelationships/delegatedAdminRelationships?$filter=status eq 'active'&$orderby=endDateTime asc&$top=10
# Tenants with specific tag
/tenantTags?$filter=displayName eq 'Priority'
GET /tenants — list all managed tenantsGET /credentialUserRegistrationsSummaries?$filter=tenantId eq '{id}' — MFA coverageGET /managedDeviceCompliances?$filter=tenantId eq '{id}' — device complianceGET /windowsProtectionStates?$filter=tenantId eq '{id}' — security statusGET /riskyUsers?$filter=tenantId eq '{id}' — risky usersGET /tenantRelationships/delegatedAdminRelationships?$filter=status eq 'active'&$orderby=endDateTime asc — find relationships nearing expirationPOST /tenantRelationships/delegatedAdminRelationships — create replacement with appropriate rolesPOST .../accessAssignments — assign partner security groups to GDAP rolesGET /managementTemplates — list available baseline templatesGET /managementTemplateStepTenantSummaries — check deployment status across tenantsGET /managementActionTenantDeploymentStatusesGET /managedTenantAlerts?$filter=status eq 'active'&$orderby=severity desc — get active alertsFor each Red/Yellow finding, generate an actionable remediation item:
| Topic | File |
|---|---|
| Azure Lighthouse delegated management, cross-tenant query, health score dimensions, weighted scoring algorithm, benchmark definitions | references/tenant-scoring.md |
| Secure Score API, MFA coverage metric, CA coverage, DLP policy coverage, license utilization, SLA metrics, composite metric collection | references/health-metrics.md |
| Multi-tenant report aggregation, PowerShell runbook, HTML report generation, Power BI connector, PDF export, sendMail delivery, tenant comparison matrix | references/msp-reporting.md |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub thelobbi/claude-m --plugin lighthouse-healthOther plugins' skills for the same job