Skip to content

Commit 5901014

Browse files
Merge pull request #100 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents daa8d24 + bc7de0c commit 5901014

444 files changed

Lines changed: 12026 additions & 1675 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/agents/CIPP-Alert-Agent.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,13 @@ When adding or modifying alerts:
102102

103103
When an alert depends on a tenant having certain SKUs or capabilities, you **must**:
104104

105-
- Use `Test-CIPPStandardLicense`
105+
- Use `Test-CIPPStandardLicense`
106+
- Prefer `-Preset` for common capability sets: `Exchange`, `SharePoint`, `Intune`, `Entra`, `EntraP2`, `Teams`, `Compliance`
107+
- Use `-RequiredCapabilities` only when no preset matches, or combine it with `-Preset` for extra edge-case capabilities
106108
- Do **not** manually inspect SKUs, raw license IDs, or raw capability lists.
107109

108110
Example pattern (adapt to the specific feature):
109111

110112
```powershell
111-
$TestResult = Test-CIPPStandardLicense -StandardName 'AutopilotProfile' -TenantFilter $Tenant -RequiredCapabilities @(
112-
'INTUNE_A',
113-
'MDM_Services',
114-
'EMS',
115-
'SCCM',
116-
'MICROSOFTINTUNEPLAN1'
117-
)
113+
$TestResult = Test-CIPPStandardLicense -StandardName 'AutopilotProfile' -TenantFilter $Tenant -Preset Intune
114+
```

.github/agents/CIPP-Standards-Agent.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ When adding or modifying standards:
8282
- Similar logging and error handling
8383
- Reuse helper functions instead of inlining raw Graph calls or custom HTTP code.
8484
- 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.
8586

8687
### 2. Return the code for the frontend.
8788

.github/instructions/alerts.instructions.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,11 @@ if ($InputValue -is [string] -and $InputValue.Trim().StartsWith('{')) {
9797
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.
9898

9999
```powershell
100-
$Licensed = Test-CIPPStandardLicense -StandardName '<AlertName>' -TenantFilter $TenantFilter -RequiredCapabilities @(
101-
'INTUNE_A',
102-
'MDM_Services'
103-
)
100+
$Licensed = Test-CIPPStandardLicense -StandardName '<AlertName>' -TenantFilter $TenantFilter -Preset Intune
104101
if (-not $Licensed) { return }
105102
```
106103

107-
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.
108105

109106
## Querying data
110107

.github/instructions/cippdb.instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ function Set-CIPPDBCacheMyNewType {
141141
142142
try {
143143
# 1. Optional license check
144-
$Licensed = Test-CIPPStandardLicense -StandardName 'MyFeature' -TenantFilter $TenantFilter -RequiredCapabilities @('REQUIRED_SKU')
144+
$Licensed = Test-CIPPStandardLicense -StandardName 'MyFeature' -TenantFilter $TenantFilter -Preset Intune
145145
if (-not $Licensed) { return }
146146
147147
# 2. Fetch data from API
@@ -160,7 +160,7 @@ function Set-CIPPDBCacheMyNewType {
160160

161161
- **Always use `-AddCount`** unless you handle count rows manually
162162
- **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
164164
- **Conditional `$select`**: expand Graph `$select` fields based on license capabilities
165165
- **Error handling**: catch, log with `Write-LogMessage`, do not rethrow (allows other types in the collection to continue)
166166
- **No explicit return** of data — these functions write to the table as a side effect

.github/instructions/standards.instructions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function Invoke-CIPPStandard<Name> {
5757
UPDATECOMMENTBLOCK
5858
Run the Tools\Update-StandardsComments.ps1 script to update this comment block
5959
.LINK
60-
https://docs.cipp.app/user-documentation/tenant/standards/list-standards
60+
https://docs.cipp.app/user-documentation/tenant/standards/alignment/templates/available-standards
6161
#>
6262
6363
param(
@@ -67,7 +67,7 @@ function Invoke-CIPPStandard<Name> {
6767
6868
# 1. License gate (if the data source requires a specific SKU)
6969
$TestResult = Test-CIPPStandardLicense -StandardName '<Name>' -TenantFilter $Tenant `
70-
-RequiredCapabilities @('CAPABILITY_1', 'CAPABILITY_2')
70+
-Preset Exchange
7171
if ($TestResult -eq $false) { return $true }
7272
7373
# 2. Get current state
@@ -235,13 +235,13 @@ Gate early using `Test-CIPPStandardLicense`. Never inspect raw SKU IDs.
235235

236236
```powershell
237237
$TestResult = Test-CIPPStandardLicense -StandardName '<Name>' -TenantFilter $Tenant `
238-
-RequiredCapabilities @('EXCHANGE_S_STANDARD', 'EXCHANGE_S_ENTERPRISE')
238+
-Preset Exchange
239239
if ($TestResult -eq $false) { return $true }
240240
```
241241

242242
The function checks tenant capabilities, logs if missing, and automatically sets the `Set-CIPPStandardsCompareField` with `LicenseAvailable = $false`.
243243

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.
245245

246246
## API call patterns
247247

@@ -337,7 +337,7 @@ The comment-based help `.NOTES` block drives the frontend UI. Each field maps to
337337
| `RECOMMENDEDBY` | `recommendedBy` | `"CIS"`, `"CIPP"`, etc. |
338338
| `MULTIPLE` | `multiple` | `True` for template-based standards (can have multiple instances) |
339339
| `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. |
341341
| `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. |
342342

343343
### Valid CAT values

Config/CIPPDBCacheTypes.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,11 @@
244244
"friendlyName": "Mailboxes",
245245
"description": "All Exchange Online mailboxes"
246246
},
247+
{
248+
"type": "HVEAccounts",
249+
"friendlyName": "HVE Accounts",
250+
"description": "High Volume Email accounts"
251+
},
247252
{
248253
"type": "CASMailboxes",
249254
"friendlyName": "CAS Mailboxes",

Config/CIPPTimers.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"Cron": "0 0 */12 * * *",
7979
"Priority": 4,
8080
"RunOnProcessor": true,
81+
"TZOffset": true,
8182
"PreferredProcessor": "standards"
8283
},
8384
{
@@ -87,6 +88,7 @@
8788
"Cron": "0 15 */12 * * *",
8889
"Priority": 5,
8990
"RunOnProcessor": true,
91+
"TZOffset": true,
9092
"PreferredProcessor": "standards"
9193
},
9294
{
@@ -120,6 +122,7 @@
120122
"Cron": "0 0 0 * * 0",
121123
"Priority": 7,
122124
"RunOnProcessor": true,
125+
"TZOffset": true,
123126
"IsSystem": true
124127
},
125128
{
@@ -137,6 +140,7 @@
137140
"Description": "Orchestrator to process domains",
138141
"Cron": "0 30 5 * * *",
139142
"Priority": 22,
143+
"TZOffset": true,
140144
"RunOnProcessor": true
141145
},
142146
{
@@ -149,6 +153,7 @@
149153
"Cron": "0 0 23 * * *",
150154
"Priority": 10,
151155
"RunOnProcessor": true,
156+
"TZOffset": true,
152157
"IsSystem": true
153158
},
154159
{
@@ -158,6 +163,7 @@
158163
"Cron": "0 0 0 * * *",
159164
"Priority": 10,
160165
"RunOnProcessor": true,
166+
"TZOffset": true,
161167
"IsSystem": true
162168
},
163169
{
@@ -166,6 +172,7 @@
166172
"Description": "Timer to process billing",
167173
"Cron": "0 0 0 * * *",
168174
"Priority": 12,
175+
"TZOffset": true,
169176
"RunOnProcessor": true
170177
},
171178
{
@@ -174,6 +181,7 @@
174181
"Description": "Orchestrator to process BPA reports",
175182
"Cron": "0 0 3 * * *",
176183
"Priority": 10,
184+
"TZOffset": true,
177185
"RunOnProcessor": true
178186
},
179187
{
@@ -191,6 +199,7 @@
191199
"Cron": "0 0 0 * * *",
192200
"Priority": 15,
193201
"RunOnProcessor": true,
202+
"TZOffset": true,
194203
"IsSystem": true
195204
},
196205
{
@@ -200,6 +209,7 @@
200209
"Cron": "0 0 23 * * *",
201210
"Priority": 20,
202211
"RunOnProcessor": true,
212+
"TZOffset": true,
203213
"IsSystem": true
204214
},
205215
{
@@ -212,6 +222,7 @@
212222
"Cron": "0 0 0 * * *",
213223
"Priority": 20,
214224
"RunOnProcessor": true,
225+
"TZOffset": true,
215226
"IsSystem": true
216227
},
217228
{
@@ -221,6 +232,7 @@
221232
"Cron": "0 0 2 * * *",
222233
"Priority": 21,
223234
"RunOnProcessor": true,
235+
"TZOffset": true,
224236
"IsSystem": true
225237
},
226238
{
@@ -230,6 +242,7 @@
230242
"Cron": "0 30 2 * * *",
231243
"Priority": 22,
232244
"RunOnProcessor": true,
245+
"TZOffset": true,
233246
"IsSystem": true
234247
},
235248
{
@@ -239,6 +252,7 @@
239252
"Cron": "0 0 3 * * *",
240253
"Priority": 23,
241254
"RunOnProcessor": true,
255+
"TZOffset": true,
242256
"IsSystem": true
243257
},
244258
{
@@ -248,6 +262,16 @@
248262
"Cron": "0 0 4 * * *",
249263
"Priority": 24,
250264
"RunOnProcessor": true,
265+
"TZOffset": true,
266+
"IsSystem": true
267+
},
268+
{
269+
"Id": "a3b4c5d6-e7f8-4a9b-8c1d-2e3f4a5b6c7d",
270+
"Command": "Start-ContainerUpdateCheck",
271+
"Description": "Check for container image updates and optionally auto-restart",
272+
"Cron": "0 0 * * * *",
273+
"Priority": 30,
274+
"RunOnProcessor": false,
251275
"IsSystem": true
252276
}
253277
]

Config/FeatureFlags.json

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,29 @@
1919
"/tenant/standards/bpa-report",
2020
"/tenant/standards/bpa-report/builder",
2121
"/tenant/standards/bpa-report/view"
22-
]
22+
],
23+
"Hidden": false
24+
},
25+
{
26+
"Id": "SuperAdminNG",
27+
"Name": "Super Admin",
28+
"Description": "Additional super admin pages for CIPP instances (CIPP Users, SSO, Container management).",
29+
"Enabled": false,
30+
"AllowUserToggle": false,
31+
"Timers": [],
32+
"Endpoints": [
33+
"ExecCIPPUsers",
34+
"ListCIPPUsers",
35+
"ExecSSOSetup",
36+
"ExecContainerManagement",
37+
"ListContainerLogs"
38+
],
39+
"Pages": [
40+
"/cipp/advanced/super-admin/cipp-users",
41+
"/cipp/advanced/super-admin/sso",
42+
"/cipp/advanced/super-admin/container",
43+
"/cipp/advanced/container-logs"
44+
],
45+
"Hidden": true
2346
}
2447
]

Config/SAMManifest.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,10 @@
571571
{
572572
"id": "a94a502d-0281-4d15-8cd2-682ac9362c4c",
573573
"type": "Role"
574+
},
575+
{
576+
"id": "d72bdbf4-a59b-405c-8b04-5995895819ac",
577+
"type": "Role"
574578
}
575579
]
576580
},

0 commit comments

Comments
 (0)