You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/agents/CIPP-Standards-Agent.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,7 @@ When adding or modifying standards:
82
82
- Similar logging and error handling
83
83
- Reuse helper functions instead of inlining raw Graph calls or custom HTTP code.
84
84
- Keep behaviour predictable.
85
+
- If a standard needs license gating, use `Test-CIPPStandardLicense` with `-Preset` for common capability sets (`Exchange`, `SharePoint`, `Intune`, `Entra`, `EntraP2`, `Teams`, `Compliance`). Use `-RequiredCapabilities` only when no preset matches, or combine it with `-Preset` for extra edge-case capabilities.
If the alert depends on a specific M365 capability (Intune, Exchange, Defender, etc.), gate it early with `Test-CIPPStandardLicense`. Never inspect raw SKU IDs manually.
Reference existing alerts in the same domain for common capability strings. The `Test-CIPPStandardLicense` function source documents the capability matching logic.
104
+
Use presets for common service families: `Exchange`, `SharePoint`, `Intune`, `Entra`, `EntraP2`, `Teams`, and `Compliance`. Use `-RequiredCapabilities` only when no preset matches, or combine it with `-Preset` when an alert needs a preset plus extra edge-case capabilities.
@@ -160,7 +160,7 @@ function Set-CIPPDBCacheMyNewType {
160
160
161
161
-**Always use `-AddCount`** unless you handle count rows manually
162
162
-**Pipeline streaming** for large datasets: pipe directly from `New-GraphGetRequest` into `Add-CIPPDbItem`
163
-
-**License gating**: use `Test-CIPPStandardLicense` when the API requires specific SKUs
163
+
-**License gating**: use `Test-CIPPStandardLicense -Preset <Name>` for common capability sets (`Exchange`, `SharePoint`, `Intune`, `Entra`, `EntraP2`, `Teams`, `Compliance`); use `-RequiredCapabilities` only for non-preset capabilities or additional edge-case capabilities
164
164
-**Conditional `$select`**: expand Graph `$select` fields based on license capabilities
165
165
-**Error handling**: catch, log with `Write-LogMessage`, do not rethrow (allows other types in the collection to continue)
166
166
-**No explicit return** of data — these functions write to the table as a side effect
The function checks tenant capabilities, logs if missing, and automatically sets the `Set-CIPPStandardsCompareField` with `LicenseAvailable = $false`.
243
243
244
-
Reference existing standards in the same domain for common capability strings. The `Test-CIPPStandardLicense` function source documents the capability matching logic.
244
+
Use presets for common service families: `Exchange`, `SharePoint`, `Intune`, `Entra`, `EntraP2`, `Teams`, and `Compliance`. Use `-RequiredCapabilities` only when no preset matches, or combine it with `-Preset` when a standard needs a preset plus extra edge-case capabilities.
245
245
246
246
## API call patterns
247
247
@@ -337,7 +337,7 @@ The comment-based help `.NOTES` block drives the frontend UI. Each field maps to
337
337
|`RECOMMENDEDBY`|`recommendedBy`|`"CIS"`, `"CIPP"`, etc. |
338
338
|`MULTIPLE`|`multiple`|`True` for template-based standards (can have multiple instances) |
339
339
|`DISABLEDFEATURES`|`disabledFeatures`| JSON object disabling specific action modes |
340
-
|`REQUIREDCAPABILITIES`|*(discovery only)*| One capability string per line; parsed for standards metadata/JSON generation. The explicit `Test-CIPPStandardLicense` call in the function body still performs the actual runtime license check. |
340
+
|`REQUIREDCAPABILITIES`|*(discovery only)*| One capability string per line; generated from `Test-CIPPStandardLicense -Preset` and/or `-RequiredCapabilities` for standards metadata/JSON generation. The explicit `Test-CIPPStandardLicense` call in the function body still performs the actual runtime license check. |
341
341
|`UPDATECOMMENTBLOCK`|*(tooling only)*| Always include with the literal value `Run the Tools\Update-StandardsComments.ps1 script to update this comment block`. Signals the comment-update tooling to regenerate this block. |
0 commit comments