Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
a059397
fix: update duration validation message for snooze alert
kris6673 Apr 13, 2026
e964a41
fix: Update duration validation message for snooze alert (#1993)
KelvinTegelaar Apr 15, 2026
06dd279
allow null
KelvinTegelaar Apr 15, 2026
e7e110c
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP-API into…
KelvinTegelaar Apr 15, 2026
0243355
add expected
KelvinTegelaar Apr 15, 2026
a1c72de
add expected and currentValue Caldefaults
KelvinTegelaar Apr 15, 2026
3bbfe44
Feat: CIPPCore breakout and performance tuning
Zacgoose Apr 5, 2026
ceae1ce
CIPPCore breakout into smaller modules, supporting cache and helper s…
KelvinTegelaar Apr 15, 2026
74d5f2e
remove old tenant failed tracing.
KelvinTegelaar Apr 15, 2026
676b5bb
remove duplicate count
KelvinTegelaar Apr 15, 2026
c984ded
added websession for now
KelvinTegelaar Apr 15, 2026
5f75629
improvements and profiling
KelvinTegelaar Apr 15, 2026
eaaa1ca
Delete Cronos.dll from module location as it now lives in shared dir
Zacgoose Apr 16, 2026
25d60ef
Check and install ModuleBuilder if missing
Zacgoose Apr 16, 2026
1047167
Return custom subject object for audit log alerts
Zacgoose Apr 16, 2026
aab6362
fix user logging for group creation api
Zacgoose Apr 16, 2026
ae50bee
Improvements to remove gc which increase throughput
KelvinTegelaar Apr 16, 2026
9e64fb3
token warmup function
KelvinTegelaar Apr 16, 2026
11d0091
token warmup improvements
KelvinTegelaar Apr 16, 2026
e3d2b68
Account for drift deviation acceptance in alignment overview
Zacgoose Apr 17, 2026
2781dd1
correct exception error message handling
Zacgoose Apr 17, 2026
2479571
Add custom scripts to backup
Zacgoose Apr 17, 2026
6505e4d
skip text replacement if tenantfilter is null
Zacgoose Apr 17, 2026
89f8894
STOPPPPPPPP
Zacgoose Apr 17, 2026
e0509bf
In the name of SPEEEEEEEED
Zacgoose Apr 17, 2026
4c4d308
introduce ng orchs
KelvinTegelaar Apr 19, 2026
019d889
cipprest updates
Zacgoose Apr 20, 2026
2b369db
reduce backup size by not including completed tasks
Zacgoose Apr 20, 2026
cb4833d
fix: update boolean conversion for query parameters
kris6673 Apr 20, 2026
a76fd55
Fix: Fixes manual processing of audit log searches
Zacgoose Apr 20, 2026
6055de0
Update profile.ps1
Zacgoose Apr 20, 2026
765bc5c
just no
Zacgoose Apr 20, 2026
6d45d05
Update bobby tables for even more speeeeeeeeeed
Zacgoose Apr 20, 2026
e44dc0a
typo
Zacgoose Apr 21, 2026
7093111
Update standards comments and required license sections
Zacgoose Apr 21, 2026
bdf545d
Fixes for exchange being dumb
Zacgoose Apr 21, 2026
9ced3b8
faster graph response times for cached data
Zacgoose Apr 21, 2026
a9ad195
make guest check less expensive
Zacgoose Apr 21, 2026
ef3daff
expose max server connections via env AZBOBBY_MAX_CONNECTIONS_PER_SERVER
Zacgoose Apr 21, 2026
d4fe3d7
docs: update CIPP standards agents and instructions file
kris6673 Apr 21, 2026
635421d
no more networking issues
Zacgoose Apr 21, 2026
0a33a38
Update Invoke-CIPPRestMethod.ps1
Zacgoose Apr 21, 2026
784497f
Update New-DeviceLogin.ps1
Zacgoose Apr 21, 2026
3523a9f
tweaks
Zacgoose Apr 21, 2026
2a9456a
fix: reporting on check extension standard
JohnDuprey Apr 21, 2026
08f0d30
feat: Support granular template resolution in alignment
JohnDuprey Apr 21, 2026
6fc4ca5
feat: Add templateType to alignment results in Invoke-ListTenantAlign…
JohnDuprey Apr 21, 2026
c2588ee
fix: Could not get token: Unable to find type [CIPP.CIPPRestClient]. …
kris6673 Apr 21, 2026
146d993
Update Invoke-ExecCIPPDBCache.ps1
Zacgoose Apr 22, 2026
747ab0c
Fix: Better batching for EXO caching
Zacgoose Apr 22, 2026
29aadfc
Merged into Dev
Zacgoose Apr 22, 2026
9972f08
Merged into Dev
Zacgoose Apr 22, 2026
aa98c9e
Merged into dev
Zacgoose Apr 22, 2026
f60611a
Remove duplicate EXO cache calls
Zacgoose Apr 22, 2026
4721da0
introduce stable id for cache and greatly improve exo permission cach…
Zacgoose Apr 22, 2026
c220738
Introduce re-batching bulk requests when batches return next links an…
Zacgoose Apr 22, 2026
2907acc
Reduce table write ops for tests by doing bulk writes
Zacgoose Apr 22, 2026
ed63529
feat: add AdminSSPR standard
kris6673 Apr 22, 2026
c5bbb4b
Rename to CIPPSharp, introduce cached testdb calls
Zacgoose Apr 22, 2026
454f273
Update Get-CIPPTestData.ps1
Zacgoose Apr 22, 2026
e0cbf6e
Better error handling around CA exclusion groups and better error mes…
Zacgoose Apr 22, 2026
d59b361
Update Invoke-ExecCAExclusion.ps1
Zacgoose Apr 22, 2026
dd535af
fix: notification contact removal in tenant offboarding
kris6673 Apr 22, 2026
194c980
prevent logging stuff
KelvinTegelaar Apr 22, 2026
dffc2e5
Delete AzBobbyTables.PS.dll
JohnDuprey Apr 22, 2026
9517ffb
fix: Use bulk skip pagination for detectedApps cache
Zacgoose Apr 23, 2026
7fc61f5
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP-API into…
Zacgoose Apr 23, 2026
002b867
Fix: Fix notification contact removal during tenant offboarding (#2011)
KelvinTegelaar Apr 23, 2026
9bdb79b
feat: Add AdminSSPR standard (#2009)
KelvinTegelaar Apr 23, 2026
d09601d
Fix: JIT Admin template support for groups and fix selected user
Zacgoose Apr 23, 2026
0115569
Update Add-CIPPDbItem.ps1
Zacgoose Apr 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 20 additions & 20 deletions .github/agents/CIPP-Standards-Agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,41 +30,41 @@ For detailed scaffolding patterns, the three action modes (remediate/alert/repor

Use this agent when a task involves:

- Adding a new standard (e.g. implement a standard to enable the audit log)
- Adding a new standard (e.g. "implement a standard to enable the audit log")

You **do not** make broad architectural changes. Keep changes focused and minimal.

---

## Key Directories & Patterns

When working on alerts, you should:
When working on standards, you should:

1. **Discover existing alerts and patterns**
1. **Discover existing standards and patterns**
- Use shell commands to explore:
- `Modules/CIPPCore/Public/Standards/`
- Inspect several existing alert files, e.g.:
- `\Modules\CIPPCore\Public\Standards\Invoke-CIPPStandardAddDKIM.ps1`
- `\Modules\CIPPCore\Public\Standards\Invoke-CIPPStandardlaps.ps1`
- `\Modules\CIPPCore\Public\Standards\Invoke-CIPPStandardOutBoundSpamAlert.ps1`
- `Modules/CIPPStandards/Public/Standards/`
- Inspect several existing standard files, e.g.:
- `Modules/CIPPStandards/Public/Standards/Invoke-CIPPStandardAddDKIM.ps1`
- `Modules/CIPPStandards/Public/Standards/Invoke-CIPPStandardlaps.ps1`
- `Modules/CIPPStandards/Public/Standards/Invoke-CIPPStandardOutBoundSpamAlert.ps1`
- Other `Invoke-CIPPStandard*.ps1` files
- Understand how alerts are **named, parameterized, and how they call Graph / Exo and helper functions**.
- Understand how standards are **named, parameterized, and how they call Graph / Exo and helper functions**.

2. **Follow the standard alert pattern**
- Alert functions live in:
`Modules/CIPPCore/Public/Standardss/`
- Alert functions are named:
`Invoke-CIPPStandardAddDKIM.ps1`
2. **Follow the standard pattern**
- Standard functions live in:
`Modules/CIPPStandards/Public/Standards/`
- Standard functions are named:
`Invoke-CIPPStandard<Name>.ps1`
- Typical characteristics:
- Standard parameter set, including `Tenant` and `Settings` which can be a complex object with subsettings, and similar common params.
- Uses CIPP helper functions like:
- `New-GraphGetRequest` for any graph requests
- `New-ExoReques` for creating exo requests
- `New-GraphGetRequest` for any Graph requests
- `New-ExoRequest` for Exchange Online requests
- Uses CIPP logging and error-handling patterns (try/catch, consistent message formatting).
- Each standard requires a Remediate, alert, and report section.
- Each standard requires a Remediate, Alert, and Report section.

3. **Rely on existing module loading**
- The CIPP module auto-loads `Public` functions recursively.
- The CIPPStandards module auto-loads `Public` functions recursively.
- **Do not** modify module manifest or loader behavior just to pick up your new standard.

---
Expand All @@ -73,9 +73,9 @@ When working on alerts, you should:

You **must** respect all of these:

### 1. Always follow existing CIPP alert patterns
### 1. Always follow existing CIPP standard patterns

When adding or modifying alerts:
When adding or modifying standards:

- Use the **same structure** as existing `Invoke-CIPPStandard*.ps1` files:
- Similar function signatures
Expand Down
11 changes: 6 additions & 5 deletions .github/instructions/auth-model.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ New-GraphGetRequest / New-ExoRequest / New-TeamsRequest / etc.
Get-GraphToken($tenantid, $scope, $AsApp)
├─ Check in-memory cache: $script:AccessTokens["{tenantid}-{scope}-{asApp}"]
├─ Check process-wide .NET cache: [CIPP.CIPPTokenCache]::Lookup(key, 120)
│ └─ Hit + not expired → return cached token
├─ Determine grant type:
Expand All @@ -43,7 +43,7 @@ New-GraphGetRequest / New-ExoRequest / New-TeamsRequest / etc.
└─ POST to login.microsoftonline.com/{tenantid}/oauth2/v2.0/token
└─ Cache result in $script:AccessTokens with expires_on
└─ Cache result via [CIPP.CIPPTokenCache]::Store(key, json, expiresOn)
```

The `-tenantid` parameter **drives token acquisition**, not just filtering. It determines which customer tenant the token is issued for.
Expand Down Expand Up @@ -116,10 +116,11 @@ Customer provides their own refresh token, stored in Key Vault per-tenant (keyed

## Token caching

Tokens are cached in `$script:AccessTokens` — a synchronized hashtable keyed by `{tenantid}-{scope}-{asApp}`.
Tokens are cached in `[CIPP.CIPPTokenCache]` — a process-wide `ConcurrentDictionary` backed by a static .NET class in `Shared/CIPPSharp/CIPPRestClient.cs`.

- **Per-runspace**: Not shared across Azure Functions instances
- **Expiry-aware**: Checks `expires_on` (Unix timestamp) before returning cached token
- **Process-wide**: Shared across all runspaces in the worker process (unlike the old `$script:AccessTokens` which was per-runspace)
- **Cache key**: Built via `[CIPP.CIPPTokenCache]::BuildKey($tenantid, $scope, $asApp, $clientId, $grantType)`
- **Expiry-aware**: `Lookup()` accepts a buffer (seconds) and returns `$false` for expired or soon-to-expire tokens
- **Auto-refresh**: Expired tokens trigger automatic re-acquisition — no manual refresh needed
- **Skip cache**: Pass `-SkipCache $true` to force a fresh token (rare, for debugging)

Expand Down
13 changes: 10 additions & 3 deletions .github/instructions/standards.instructions.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
applyTo: "Modules/CIPPCore/Public/Standards/**"
applyTo: "Modules/CIPPStandards/Public/Standards/**"
description: "Use when creating, modifying, or reviewing CIPP standard functions (Invoke-CIPPStandard*). Contains scaffolding patterns, the three action modes (remediate/alert/report), $Settings conventions, API call patterns, and frontend JSON payloads."
---

# CIPP Standard Functions

Standard functions live in `Modules/CIPPCore/Public/Standards/` and are auto-loaded by the CIPPCore module. No manifest changes needed.
Standard functions live in `Modules/CIPPStandards/Public/Standards/` and are auto-loaded by the CIPPStandards module. No manifest changes needed.

## Naming

Expand Down Expand Up @@ -51,6 +51,11 @@ function Invoke-CIPPStandard<Name> {
True
DISABLEDFEATURES
{"report":false,"warn":false,"remediate":false}
REQUIREDCAPABILITIES
"CAPABILITY_1"
"CAPABILITY_2"
UPDATECOMMENTBLOCK
Run the Tools\Update-StandardsComments.ps1 script to update this comment block
.LINK
https://docs.cipp.app/user-documentation/tenant/standards/list-standards
#>
Expand Down Expand Up @@ -332,6 +337,8 @@ The comment-based help `.NOTES` block drives the frontend UI. Each field maps to
| `RECOMMENDEDBY` | `recommendedBy` | `"CIS"`, `"CIPP"`, etc. |
| `MULTIPLE` | `multiple` | `True` for template-based standards (can have multiple instances) |
| `DISABLEDFEATURES` | `disabledFeatures` | JSON object disabling specific action modes |
| `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. |
| `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. |

### Valid CAT values

Expand Down Expand Up @@ -388,7 +395,7 @@ Impact colour mapping: `Low Impact` → `info`, `Medium Impact` → `warning`, `

## Checklist for new standards

1. Create `Modules/CIPPCore/Public/Standards/Invoke-CIPPStandard<Name>.ps1`
1. Create `Modules/CIPPStandards/Public/Standards/Invoke-CIPPStandard<Name>.ps1`
2. Include the full `.NOTES` metadata block (CAT, TAG, IMPACT, ADDEDCOMPONENT, etc.)
3. Implement all three modes: remediate, alert, report
4. Add license gating if the data source requires a specific SKU
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/dev_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ jobs:
tenant-id: ${{ secrets.DEV_TENANTID }}
subscription-id: ${{ secrets.DEV_SUBSCRIPTIONID }}

- name: Build and stage modules
shell: pwsh
run: ./Tools/Build-DevApiModules.ps1

- name: "Run Azure Functions Action"
uses: Azure/functions-action@v1
id: fa
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ SendNotifications/config.json
Output/
node_modules/.yarn-integrity
yarn.lock
Shared/CIPPSharp/obj/

# Cursor IDE
.cursor/rules
Expand Down
20 changes: 0 additions & 20 deletions CIPPDBCacheTypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,26 +204,6 @@
"friendlyName": "Exchange Hosted Outbound Spam Filter Policy",
"description": "Exchange Online hosted outbound spam filter policy"
},
{
"type": "ExoAntiPhishPolicy",
"friendlyName": "Exchange Anti-Phish Policy",
"description": "Exchange Online anti-phishing policy"
},
{
"type": "ExoSafeLinksPolicy",
"friendlyName": "Exchange Safe Links Policy",
"description": "Exchange Online Safe Links policy"
},
{
"type": "ExoSafeAttachmentPolicy",
"friendlyName": "Exchange Safe Attachment Policy",
"description": "Exchange Online Safe Attachment policy"
},
{
"type": "ExoMalwareFilterPolicy",
"friendlyName": "Exchange Malware Filter Policy",
"description": "Exchange Online malware filter policy"
},
{
"type": "ExoAtpPolicyForO365",
"friendlyName": "Exchange ATP Policy for O365",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file removed Modules/AzBobbyTables/3.4.0/AzBobbyTables.PS.dll
Binary file not shown.
86 changes: 0 additions & 86 deletions Modules/AzBobbyTables/3.4.0/CHANGELOG.md

This file was deleted.

Loading