Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
09c5b3b
Merge pull request #8 from KelvinTegelaar/dev
TecharyJames Apr 1, 2026
08fcd89
Merge pull request #9 from KelvinTegelaar/dev
TecharyJames Apr 2, 2026
3c2fbae
Merge pull request #10 from KelvinTegelaar/dev
TecharyJames Apr 3, 2026
d09f10e
Merge branch 'KelvinTegelaar:dev' into dev
TecharyJames Apr 3, 2026
f45218b
Merge pull request #11 from KelvinTegelaar/dev
pull[bot] Apr 3, 2026
e3a2436
Merge pull request #12 from KelvinTegelaar/dev
pull[bot] Apr 3, 2026
ba42ff3
Merge pull request #13 from KelvinTegelaar/dev
pull[bot] Apr 4, 2026
101ec62
Merge pull request #14 from KelvinTegelaar/dev
pull[bot] Apr 5, 2026
77684ea
Merge pull request #15 from KelvinTegelaar/dev
pull[bot] Apr 5, 2026
d8b0a05
Merge pull request #16 from KelvinTegelaar/dev
pull[bot] Apr 5, 2026
f24236b
Merge pull request #17 from KelvinTegelaar/dev
pull[bot] Apr 6, 2026
3c5a0f8
Merge pull request #18 from KelvinTegelaar/dev
pull[bot] Apr 7, 2026
fc678be
Merge pull request #19 from KelvinTegelaar/dev
pull[bot] Apr 7, 2026
33cef71
Merge pull request #20 from KelvinTegelaar/dev
pull[bot] Apr 7, 2026
b412146
Merge pull request #21 from KelvinTegelaar/dev
pull[bot] Apr 8, 2026
ad2d977
Merge pull request #22 from KelvinTegelaar/dev
pull[bot] Apr 9, 2026
14e913e
Merge pull request #23 from KelvinTegelaar/dev
pull[bot] Apr 9, 2026
c2d53d1
Merge pull request #24 from KelvinTegelaar/dev
pull[bot] Apr 10, 2026
0de8fa3
Merge pull request #26 from KelvinTegelaar/dev
pull[bot] Apr 10, 2026
1d48b53
Merge pull request #27 from KelvinTegelaar/dev
pull[bot] Apr 12, 2026
193c772
Merge pull request #28 from KelvinTegelaar/dev
pull[bot] Apr 13, 2026
8fc758b
Merge pull request #29 from KelvinTegelaar/dev
pull[bot] Apr 13, 2026
628ba95
Merge pull request #31 from KelvinTegelaar/dev
pull[bot] Apr 13, 2026
18f34b5
Merge pull request #32 from KelvinTegelaar/dev
pull[bot] Apr 15, 2026
3377746
Merge pull request #33 from KelvinTegelaar/dev
pull[bot] Apr 15, 2026
ba86d08
Merge pull request #34 from KelvinTegelaar/dev
pull[bot] Apr 15, 2026
21eb0d0
Merge pull request #35 from KelvinTegelaar/dev
pull[bot] Apr 15, 2026
e82ee11
Merge pull request #36 from KelvinTegelaar/dev
pull[bot] Apr 16, 2026
5a5310b
Merge pull request #37 from KelvinTegelaar/dev
pull[bot] Apr 16, 2026
a2eab38
Merge pull request #38 from KelvinTegelaar/dev
pull[bot] Apr 16, 2026
688d29a
Merge pull request #39 from KelvinTegelaar/dev
pull[bot] Apr 17, 2026
858e2d5
Merge pull request #40 from KelvinTegelaar/dev
pull[bot] Apr 17, 2026
bf1733e
Merge pull request #41 from KelvinTegelaar/dev
pull[bot] Apr 17, 2026
5a83257
Merge pull request #42 from KelvinTegelaar/dev
pull[bot] Apr 19, 2026
7483979
Merge pull request #43 from KelvinTegelaar/dev
pull[bot] Apr 20, 2026
1e06116
Collect admin UPNs from role groups and users
TecharyJames Apr 22, 2026
ef2fff0
Merge branch 'KelvinTegelaar:master' into feat/-Configure-Encrypted-M…
chris-dewey-1991 Apr 26, 2026
f2cd153
Creation of OME Encrypted Message Branding Standard
chris-dewey-1991 Apr 26, 2026
c9ca4f0
Merge branch 'KelvinTegelaar:master' into fix-add-support-for-group-a…
TecharyJames Apr 27, 2026
6f4c32c
feat(mde-onboarding): cache full connector properties
kris6673 Apr 27, 2026
307db51
fix: handle case when no tenants found for MDE report
kris6673 Apr 27, 2026
3ff08f0
feat: update intuneCollection with new properties
kris6673 Apr 28, 2026
0e3413c
feat: enrich Intune policy setting details
kris6673 Apr 28, 2026
d15734d
Merge branch 'settings-tooltips' of https://github.com/kris6673/CIPP-…
kris6673 Apr 28, 2026
4727715
feat: show full MDE connector details (#2026)
KelvinTegelaar Apr 29, 2026
10ddece
Merge branch 'dev' into settings-tooltips
KelvinTegelaar Apr 29, 2026
1606bf1
feat: enrich Intune policy setting details (#2031)
KelvinTegelaar Apr 29, 2026
c39d061
Fix: Add support for group assigned admin roles to 'disable exo' stan…
KelvinTegelaar Apr 29, 2026
834b4c6
fix: calculated group type in listusergroups
JohnDuprey Apr 29, 2026
fe7b013
Feat/Configure Encrypted Message Branding OME (#2023)
KelvinTegelaar Apr 29, 2026
9700734
Use ConvertTo-SafeArray for all EXO domain checks
Zacgoose Apr 30, 2026
e0df450
account for trials
Zacgoose Apr 30, 2026
29e3006
Update Get-CIPPLicenseOverview.ps1
Zacgoose Apr 30, 2026
1416a14
Simple is best
Zacgoose Apr 30, 2026
264abca
Update Invoke-CIPPDBCacheCollection.ps1
Zacgoose Apr 30, 2026
3ed7bdd
Update New-CIPPAPIConfig.ps1
Zacgoose Apr 30, 2026
a78bd50
slight orc changes
Zacgoose Apr 30, 2026
b446c02
Update Add-CippQueueMessage.ps1
Zacgoose Apr 30, 2026
f036c0b
fix: odata sanitization
JohnDuprey Apr 30, 2026
89ade0e
How long has this been wrong?
Zacgoose May 1, 2026
e0db8da
Fix oauth consent not adding ms app id after the fact
Zacgoose May 1, 2026
b937399
Add specific DNS endpoints to TCP connection limits
Zacgoose May 1, 2026
924a078
Fix listing of excluded tenants in scripted alerts
Zacgoose May 1, 2026
1639700
Update add CA exclusion to account for targeted roles
Zacgoose May 1, 2026
0a08f63
Add ResultMode, CIPP wrapper handling, Github save/import and custom …
Zacgoose May 1, 2026
6c27c34
Custom variable support + block explicit calls with tenantfilter
Zacgoose May 1, 2026
4589d5d
So the docs are wrong about this one
Zacgoose May 1, 2026
1cf4ee6
Prevent race conditions for duplicate audit logs
Zacgoose May 1, 2026
78eb1ae
More escaping for HMTL alerts that contain objects
Zacgoose May 1, 2026
cf66039
Silly audit logs
Zacgoose May 1, 2026
8c4f9bd
fix: Add SHAREPOINTENTERPRISE_GOV to license checks
JohnDuprey May 1, 2026
a0b7655
chore: bump version to 10.4.3
JohnDuprey May 2, 2026
bd676d3
Dev to hotfix (#2036)
JohnDuprey May 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
257,817 changes: 1 addition & 257,816 deletions Config/intuneCollection.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@ function Push-AuditLogSearchCreation {
$Tenant = $Item.Tenant
$StartTime = $Item.StartTime
$EndTime = $Item.EndTime
$ServiceFilters = @($Item.ServiceFilters)

try {
$LogSearch = @{
StartTime = $StartTime
EndTime = $EndTime
ServiceFilters = $ServiceFilters
TenantFilter = $Tenant.defaultDomainName
ProcessLogs = $true
RecordTypeFilters = @(
Expand All @@ -30,6 +27,8 @@ function Push-AuditLogSearchCreation {
$NewSearch = New-CippAuditLogSearch @LogSearch
if ($NewSearch.id) {
Write-Information "Created audit log search $($Tenant.defaultDomainName) - $($NewSearch.displayName)"
} elseif ($NewSearch.cippStatus -eq 'TransientError') {
Write-Information "Audit log search creation hit transient error for tenant $($Tenant.defaultDomainName) ($($NewSearch.status))"
} elseif ($NewSearch.status -eq 'AuditingDisabledTenant') {
Write-Information "Skipping audit log search $($Tenant.defaultDomainName) because unified auditing is disabled for this tenant"
Write-LogMessage -API 'Audit Logs' -Message "Skipped audit log search creation for tenant $($Tenant.defaultDomainName) because unified auditing is disabled" -Sev Warning -tenant $Tenant.defaultDomainName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function Get-CippAuditLogSearches {
$PendingQueries = Get-CIPPAzDataTableEntity @AuditLogSearchesTable -Filter "PartitionKey eq 'Search' and Tenant eq '$TenantFilter' and (CippStatus eq 'Pending' or (CippStatus eq 'Processing' and Timestamp le datetime'$15MinutesAgo')) and Timestamp ge datetime'$1DayAgo'" | Sort-Object Timestamp
} else {
$7DaysAgo = (Get-Date).AddDays(-7).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ')
$PendingQueries = Get-CIPPAzDataTableEntity @AuditLogSearchesTable -Filter "Tenant eq '$TenantFilter' and Timestamp ge datetime'$7DaysAgo'"
$PendingQueries = Get-CIPPAzDataTableEntity @AuditLogSearchesTable -Filter "PartitionKey eq 'Search' and Tenant eq '$TenantFilter' and Timestamp ge datetime'$7DaysAgo'"
}

$BulkRequests = foreach ($PendingQuery in $PendingQueries) {
Expand Down
21 changes: 7 additions & 14 deletions Modules/CIPPCore/Public/AuditLogs/New-CippAuditLogSearch.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ function New-CippAuditLogSearch {
The record types to filter on.
.PARAMETER KeywordFilter
The keyword to filter on.
.PARAMETER ServiceFilter
The service to filter on.
.PARAMETER OperationsFilters
The operations to filter on.
.PARAMETER UserPrincipalNameFilters
Expand Down Expand Up @@ -109,8 +107,6 @@ function New-CippAuditLogSearch {
[Parameter()]
[string]$KeywordFilters,
[Parameter()]
[string[]]$ServiceFilters,
[Parameter()]
[string[]]$OperationsFilters,
[Parameter()]
[string[]]$UserPrincipalNameFilters,
Expand All @@ -130,16 +126,13 @@ function New-CippAuditLogSearch {
filterEndDateTime = $EndTime.AddHours(1).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ss')
}
if ($OperationsFilters) {
$SearchParams.operationsFilters = $OperationsFilters
$SearchParams.operationFilters = @($OperationsFilters)
}
if ($RecordTypeFilters) {
$SearchParams.recordTypeFilters = @($RecordTypeFilters)
}
if ($KeywordFilters) {
$SearchParams.keywordFilters = $KeywordFilters
}
if ($ServiceFilters) {
$SearchParams.serviceFilters = $ServiceFilters
$SearchParams.keywordFilter = $KeywordFilters
}
if ($UserPrincipalNameFilters) {
$SearchParams.userPrincipalNameFilters = @($UserPrincipalNameFilters)
Expand All @@ -151,7 +144,7 @@ function New-CippAuditLogSearch {
$SearchParams.objectIdFilters = @($ObjectIdFilters)
}
if ($AdministrativeUnitFilters) {
$SearchParams.administrativeUnitFilters = @($AdministrativeUnitFilters)
$SearchParams.administrativeUnitIdFilters = @($AdministrativeUnitFilters)
}

if ($PSCmdlet.ShouldProcess('Create a new audit log search for tenant ' + $TenantFilter)) {
Expand Down Expand Up @@ -193,26 +186,26 @@ function New-CippAuditLogSearch {
# Handle HTML error pages (e.g. Azure Front Door 502/504 gateway timeouts)
if ($TrimmedAuditLogErrorMessage -match '<!DOCTYPE|<html' -and $TrimmedAuditLogErrorMessage -match '<title>([^<]+)</title>') {
$HtmlTitle = $Matches[1].Trim()
Write-LogMessage -API 'Audit Logs' -tenant $TenantFilter -message "Audit log search creation failed with gateway error for tenant $TenantFilter ($HtmlTitle) - will retry next cycle" -sev Warning
Write-LogMessage -API 'Audit Logs' -tenant $TenantFilter -message "Audit log search creation failed with gateway error for tenant $TenantFilter ($HtmlTitle)" -sev Warning
return [PSCustomObject]@{
id = $null
displayName = [string]$DisplayName
status = [string]'GatewayError'
cippStatus = [string]'TransientError'
message = [string]"Microsoft returned gateway error ($HtmlTitle) - search will be retried next cycle."
message = [string]"Microsoft returned gateway error ($HtmlTitle)."
}
}

# Handle Microsoft-side timeouts / transient errors (e.g. UnknownError with empty message)
$ErrorCode = $AuditLogError.error.code ?? $AuditLogError.code
if ($ErrorCode -in @('UnknownError', 'ServiceUnavailable', 'RequestTimeout', 'GatewayTimeout', 'TooManyRequests')) {
Write-LogMessage -API 'Audit Logs' -tenant $TenantFilter -message "Audit log search creation failed with transient error for tenant $TenantFilter ($ErrorCode) - will retry next cycle" -sev Warning
Write-LogMessage -API 'Audit Logs' -tenant $TenantFilter -message "Audit log search creation failed with transient error for tenant $TenantFilter ($ErrorCode)" -sev Warning
return [PSCustomObject]@{
id = $null
displayName = [string]$DisplayName
status = [string]$ErrorCode
cippStatus = [string]'TransientError'
message = [string]"Microsoft returned $ErrorCode - search will be retried next cycle."
message = [string]"Microsoft returned $ErrorCode."
}
}

Expand Down
77 changes: 47 additions & 30 deletions Modules/CIPPCore/Public/Authentication/New-CIPPAPIConfig.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,13 @@ function New-CIPPAPIConfig {
if ($ResetSecret.IsPresent -and $APIApp) {
if ($PSCmdlet.ShouldProcess($APIApp.displayName, 'Reset API Secret')) {
$Step = 'Resetting Application Password'
Write-Information 'Removing all old passwords'

try {
$PolicyUpdate = Update-AppManagementPolicy -ApplicationId $APIApp.appId
Write-Information "Policy check for secret reset: $($PolicyUpdate.PolicyAction)"
} catch {
Write-Information "Failed to update app management policy during secret reset: $($_.Exception.Message)"
}

$AppManagementPolicy = New-GraphGetRequest -uri 'https://graph.microsoft.com/v1.0/policies/defaultAppManagementPolicy' -AsApp $true -NoAuthCheck $true
$PasswordExpirationPolicy = $AppManagementPolicy.applicationRestrictions.passwordcredentials |
Expand All @@ -207,39 +213,50 @@ function New-CIPPAPIConfig {
$NewPasswordCredential.endDateTime = $ExpirationDate
}

$Requests = @(
@{
id = 'removeOldPasswords'
method = 'PATCH'
url = "applications/$($APIApp.id)/"
headers = @{
'Content-Type' = 'application/json'
}
body = @{
passwordCredentials = @()
}
},
@{
id = 'addNewPassword'
method = 'POST'
url = "applications/$($APIApp.id)/addPassword"
headers = @{
'Content-Type' = 'application/json'
Write-Information 'Removing all old passwords'
for ($Attempt = 1; $Attempt -le 6; $Attempt++) {
$Requests = @(
@{
id = 'removeOldPasswords'
method = 'PATCH'
url = "applications/$($APIApp.id)/"
headers = @{
'Content-Type' = 'application/json'
}
body = @{
passwordCredentials = @()
}
},
@{
id = 'addNewPassword'
method = 'POST'
url = "applications/$($APIApp.id)/addPassword"
headers = @{
'Content-Type' = 'application/json'
}
body = @{
passwordCredential = $NewPasswordCredential
}
dependsOn = @('removeOldPasswords')
}
body = @{
passwordCredential = $NewPasswordCredential
)
$BatchResponse = New-GraphBulkRequest -tenantid $env:TenantID -NoAuthCheck $true -asapp $true -Requests $Requests
$AddPasswordResponse = $BatchResponse | Where-Object { $_.id -eq 'addNewPassword' }
if ($AddPasswordResponse.status -ge 400) {
$ErrorBody = $AddPasswordResponse.body
$ErrorMsg = $ErrorBody.error.message ?? ($ErrorBody | ConvertTo-Json -Compress -Depth 5)
$IsCredentialPolicyBlocked = $ErrorMsg -match 'Credential type not allowed as per assigned policy'
if ($IsCredentialPolicyBlocked -and $Attempt -lt 6) {
$DelaySeconds = [Math]::Min(10, 1 * $Attempt)
Write-Information "Credential policy still blocks addPassword (attempt $Attempt of 6). Waiting for policy propagation and retrying in $DelaySeconds second(s)."
Start-Sleep -Seconds $DelaySeconds
continue
}
dependsOn = @('removeOldPasswords')
throw "Failed to add new password during secret reset: $ErrorMsg"
}
)
$BatchResponse = New-GraphBulkRequest -tenantid $env:TenantID -NoAuthCheck $true -asapp $true -Requests $Requests
$AddPasswordResponse = $BatchResponse | Where-Object { $_.id -eq 'addNewPassword' }
if ($AddPasswordResponse.status -ge 400) {
$ErrorBody = $AddPasswordResponse.body
$ErrorMsg = $ErrorBody.error.message ?? ($ErrorBody | ConvertTo-Json -Compress -Depth 5)
throw "Failed to add new password during secret reset: $ErrorMsg"
$APIPassword = $AddPasswordResponse.body
break
}
$APIPassword = $AddPasswordResponse.body
Write-LogMessage -headers $Headers -API $APINAME -tenant 'None '-message "Reset CIPP-API Password for '$($APIApp.displayName)'." -Sev 'info'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,29 +68,25 @@ function Start-AuditLogSearchCreation {
}

$TenantInConfig = $false
$MatchingConfigs = [System.Collections.Generic.List[object]]::new()
foreach ($ConfigEntry in $ConfigEntries) {
if ($ConfigEntry.excludedTenants.value -contains $Tenant.defaultDomainName) {
continue
}
if ($ConfigEntry.ExpandedTenants -contains $Tenant.defaultDomainName -or $ConfigEntry.ExpandedTenants -contains 'AllTenants') {
$TenantInConfig = $true
$MatchingConfigs.Add($ConfigEntry)
break
}
}

if (!$TenantInConfig) {
continue
}

if ($MatchingConfigs) {
[PSCustomObject]@{
FunctionName = 'AuditLogSearchCreation'
Tenant = $Tenant | Select-Object defaultDomainName, customerId, displayName
StartTime = $StartTime
EndTime = $EndTime
ServiceFilters = @($MatchingConfigs | Select-Object -Property type | Sort-Object -Property type -Unique | ForEach-Object { $_.type.split('.')[1] })
}
[PSCustomObject]@{
FunctionName = 'AuditLogSearchCreation'
Tenant = $Tenant | Select-Object defaultDomainName, customerId, displayName
StartTime = $StartTime
EndTime = $EndTime
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@ function Start-CIPPOrchestrator {
[switch]$CallerIsQueueTrigger
)

# ─── CIPPNG runtime: push batch directly to OrchestratorService ───
# ─── CRAFT runtime: push batch directly to OrchestratorService ───
if ($env:CIPPNG -eq 'true' -and $InputObject) {
$OrchestratorName = $InputObject.OrchestratorName ?? 'UnnamedOrchestrator'

# QueueFunction pattern: call the function first to generate batch items
if (-not $InputObject.Batch -and $InputObject.QueueFunction) {
$QueueFuncName = "Push-$($InputObject.QueueFunction.FunctionName)"
Write-Information "CIPP-NG: Calling QueueFunction '$QueueFuncName' to build batch for '$OrchestratorName'"
Write-Information "CRAFT: Calling QueueFunction '$QueueFuncName' to build batch for '$OrchestratorName'"
$QueueItem = [PSCustomObject]@{}
if ($InputObject.QueueFunction.Parameters) {
$QueueItem = [PSCustomObject]$InputObject.QueueFunction.Parameters
}
$BatchResult = & $QueueFuncName -Item $QueueItem
$QueueBatch = @($BatchResult | Where-Object { $null -ne $_ })
if ($QueueBatch.Count -eq 0) {
Write-Information "CIPP-NG: QueueFunction '$QueueFuncName' returned 0 tasks for '$OrchestratorName' - skipping"
return "CIPPNG-$OrchestratorName-NoTasks"
Write-Information "CRAFT: QueueFunction '$QueueFuncName' returned 0 tasks for '$OrchestratorName' - skipping"
return "CRAFT-$OrchestratorName-NoTasks"
}
$InputObject | Add-Member -MemberType NoteProperty -Name 'Batch' -Value $QueueBatch -Force
}
Expand All @@ -66,15 +66,15 @@ function Start-CIPPOrchestrator {
}
}

Write-Information "CIPP-NG: Queuing orchestrator '$OrchestratorName' ($($InputObject.Batch.Count) tasks$(if ($PostExecFunctionName) { ", PostExec: $PostExecFunctionName" }))"
[CIPPASP.Services.OrchestratorBridge]::QueueOrchestration(
Write-Information "CRAFT: Queuing orchestrator '$OrchestratorName' ($($InputObject.Batch.Count) tasks$(if ($PostExecFunctionName) { ", PostExec: $PostExecFunctionName" }))"
[CRAFT.Services.OrchestratorBridge]::QueueOrchestration(
$OrchestratorName,
$BatchJson,
4,
$PostExecFunctionName,
$PostExecParametersJson
)
return "CIPPNG-$OrchestratorName"
return "CRAFT-$OrchestratorName"
}

$OrchestratorTable = Get-CippTable -TableName 'CippOrchestratorInput'
Expand Down
5 changes: 5 additions & 0 deletions Modules/CIPPCore/Public/Get-CIPPDbItem.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ function Get-CIPPDbItem {
)

try {
# Enforce tenant lock when running inside custom script execution
if ($script:CIPPLockedTenant) {
$TenantFilter = $script:CIPPLockedTenant
}

$Table = Get-CippTable -tablename 'CippReportingDB'

if ($TenantFilter -ne 'allTenants') {
Expand Down
6 changes: 4 additions & 2 deletions Modules/CIPPCore/Public/Get-CIPPLicenseOverview.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,13 @@ function Get-CIPPLicenseOverview {
$SubInfo = $SkuIDs | Where-Object { $_.id -eq $Subscription }
$diff = $SubInfo.nextLifecycleDateTime - $SubInfo.createdDateTime
$Term = 'Term unknown or non-NCE license'
if ($diff.Days -ge 32 -and $diff.Days -le 1089) {
if ($SubInfo.isTrial) {
$Term = 'Trial'
} elseif ($diff.Days -ge 36 -and $diff.Days -le 1089) {
$Term = 'Yearly'
} elseif ($diff.Days -ge 1090 -and $diff.Days -le 1100) {
$Term = '3 Year'
} elseif ($diff.Days -ge 25 -and $diff.Days -le 31) {
} elseif ($diff.Days -ge 25 -and $diff.Days -le 35) {
$Term = 'Monthly'
}
$TimeUntilRenew = ($subinfo.nextLifecycleDateTime - (Get-Date)).days
Expand Down
4 changes: 4 additions & 0 deletions Modules/CIPPCore/Public/Get-CIPPMDEOnboardingReport.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ function Get-CIPPMDEOnboardingReport {
$TenantList = Get-Tenants -IncludeErrors
$Tenants = $Tenants | Where-Object { $TenantList.defaultDomainName -contains $_ }

if (-not $Tenants) {
throw 'No MDE onboarding data found in reporting database for any tenant. Sync the report data first.'
}

$AllResults = [System.Collections.Generic.List[PSCustomObject]]::new()
foreach ($Tenant in $Tenants) {
try {
Expand Down
4 changes: 1 addition & 3 deletions Modules/CIPPCore/Public/Get-CIPPSchemaExtensions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ function Get-CIPPSchemaExtensions {
)

# Get definitions file
$CIPPCore = Get-Module -Name 'CIPPCore' | Select-Object -ExpandProperty ModuleBase
$CIPPRoot = (Get-Item -Path $CIPPCore).Parent.Parent
$SchemaDefinitionsPath = Join-Path $CIPPRoot 'Config\schemaDefinitions.json'
$SchemaDefinitionsPath = Join-Path $env:CIPPRootPath 'Config\schemaDefinitions.json'

# check CustomData table for schema extensions
$CustomDataTable = Get-CippTable -tablename 'CustomData'
Expand Down
11 changes: 10 additions & 1 deletion Modules/CIPPCore/Public/Get-CIPPTestData.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,22 @@ function Get-CIPPTestData {
#>
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[Parameter(Mandatory = $false)]
[string]$TenantFilter,

[Parameter(Mandatory = $false)]
[string]$Type
)

# Enforce tenant lock when running inside custom script execution
if ($script:CIPPLockedTenant) {
$TenantFilter = $script:CIPPLockedTenant
}

if ([string]::IsNullOrWhiteSpace($TenantFilter)) {
throw 'TenantFilter is required.'
}

$CacheKey = '{0}|{1}' -f $TenantFilter, $Type

$CachedValue = $null
Expand Down
4 changes: 2 additions & 2 deletions Modules/CIPPCore/Public/GraphHelper/Add-CippQueueMessage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ function Add-CippQueueMessage {
try {
if ($env:CIPPNG -eq 'true') {
$ParametersJson = $Parameters | ConvertTo-Json -Depth 10 -Compress
[CIPPASP.Services.QueueBridge]::Enqueue($Cmdlet, $ParametersJson)
Write-Information "CIPP-NG: Queued $Cmdlet for background execution"
[CRAFT.Services.QueueBridge]::Enqueue($Cmdlet, $ParametersJson)
Write-Information "CRAFT: Queued $Cmdlet for background execution"
return $true
}

Expand Down
2 changes: 0 additions & 2 deletions Modules/CIPPCore/Public/Invoke-CIPPDBCacheCollection.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ function Invoke-CIPPDBCacheCollection {
ExchangeData = @(
'CASMailboxes'
'MailboxUsage'
'OneDriveSiteListing'
'OneDriveUsage'
'SharePointSiteListing'
'SharePointSiteUsage'
'OfficeActivations'
)
Expand Down
Loading