Skip to content

Commit 4909e9c

Browse files
dbcache desc
1 parent 6a1c373 commit 4909e9c

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/Invoke-ListDBCache.ps1

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,32 @@ function Invoke-ListDBCache {
44
Entrypoint
55
.ROLE
66
CIPP.Core.Read
7+
.DESCRIPTION
8+
Retrieves cached tenant data from the CIPP reporting database (CippReportingDB). This is the fastest
9+
and most efficient way to query tenant data across single or multiple tenants. The database is populated
10+
nightly by background cache jobs, so data is typically at most 24 hours old.
11+
12+
Required query parameters:
13+
- tenantFilter: The tenant domain or 'AllTenants' to query all managed tenants.
14+
- type: The cache collection to retrieve (e.g. Users, Groups, Mailboxes, Devices, etc.).
15+
16+
Use type=_availableTypes to discover which cache collections exist for a given tenant. Omitting the
17+
type parameter also returns the available types.
18+
19+
PERFORMANCE GUIDANCE: For AllTenants queries or any bulk/cross-tenant data retrieval, prefer
20+
ListDBCache over calling individual endpoints (e.g. ListUsers, ListGroups, ListMailboxes) directly.
21+
Individual endpoints make live API calls per tenant which is significantly slower and may hit
22+
throttling limits. ListDBCache reads pre-cached data from Azure Table Storage and returns results
23+
in seconds regardless of tenant count.
24+
25+
Recommended workflow for MCP tool selection:
26+
1. Call ListDBCache with type=_availableTypes to discover available cache collections.
27+
2. If the data you need exists as a cache type, use ListDBCache with that type.
28+
3. Only fall back to individual List* endpoints when you need real-time data for a single tenant
29+
or when the data is not available in the cache.
30+
31+
Common cache types include: Users, Groups, Mailboxes, Devices, ConditionalAccess, Applications,
32+
IntunePolicy, CompliancePolicy, and many more. The exact set depends on what has been configured.
733
#>
834
[CmdletBinding()]
935
param (

0 commit comments

Comments
 (0)