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
└─ POST to login.microsoftonline.com/{tenantid}/oauth2/v2.0/token
45
45
│
46
-
└─ Cache result in $script:AccessTokens with expires_on
46
+
└─ Cache result via [CIPP.CIPPTokenCache]::Store(key, json, expiresOn)
47
47
```
48
48
49
49
The `-tenantid` parameter **drives token acquisition**, not just filtering. It determines which customer tenant the token is issued for.
@@ -116,10 +116,11 @@ Customer provides their own refresh token, stored in Key Vault per-tenant (keyed
116
116
117
117
## Token caching
118
118
119
-
Tokens are cached in `$script:AccessTokens` — a synchronized hashtable keyed by `{tenantid}-{scope}-{asApp}`.
119
+
Tokens are cached in `[CIPP.CIPPTokenCache]` — a process-wide `ConcurrentDictionary` backed by a static .NET class in `Shared/CIPPSharp/CIPPRestClient.cs`.
120
120
121
-
-**Per-runspace**: Not shared across Azure Functions instances
122
-
-**Expiry-aware**: Checks `expires_on` (Unix timestamp) before returning cached token
121
+
-**Process-wide**: Shared across all runspaces in the worker process (unlike the old `$script:AccessTokens` which was per-runspace)
122
+
-**Cache key**: Built via `[CIPP.CIPPTokenCache]::BuildKey($tenantid, $scope, $asApp, $clientId, $grantType)`
123
+
-**Expiry-aware**: `Lookup()` accepts a buffer (seconds) and returns `$false` for expired or soon-to-expire tokens
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."
4
4
---
5
5
6
6
# CIPP Standard Functions
7
7
8
-
Standard functions live in `Modules/CIPPCore/Public/Standards/` and are auto-loaded by the CIPPCore module. No manifest changes needed.
8
+
Standard functions live in `Modules/CIPPStandards/Public/Standards/` and are auto-loaded by the CIPPStandards module. No manifest changes needed.
9
9
10
10
## Naming
11
11
@@ -51,6 +51,11 @@ function Invoke-CIPPStandard<Name> {
51
51
True
52
52
DISABLEDFEATURES
53
53
{"report":false,"warn":false,"remediate":false}
54
+
REQUIREDCAPABILITIES
55
+
"CAPABILITY_1"
56
+
"CAPABILITY_2"
57
+
UPDATECOMMENTBLOCK
58
+
Run the Tools\Update-StandardsComments.ps1 script to update this comment block
@@ -332,6 +337,8 @@ The comment-based help `.NOTES` block drives the frontend UI. Each field maps to
332
337
|`RECOMMENDEDBY`|`recommendedBy`|`"CIS"`, `"CIPP"`, etc. |
333
338
|`MULTIPLE`|`multiple`|`True` for template-based standards (can have multiple instances) |
334
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. |
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. |
"Description": "In this repo, you will find Intune profiles in JSON format, which can be used in setting up your Modern Workplace. All policies were created in Microsoft Intune and exported to share with the community.",
0 commit comments