Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
7b26b11
fix(compare): handle non-catalog null results
kris6673 Apr 30, 2026
ece775b
feat(intune): extend ListIntunePolicy for admin templates
kris6673 Apr 30, 2026
8856340
dead code
Zacgoose May 5, 2026
8e12d10
Correct CIPP SAM addition repeated alerts
Zacgoose May 5, 2026
b230c7f
Fix drift tag resolution using stale rawData instead of live lookup
Zacgoose May 5, 2026
7a7c70d
fix: remove +1hr buffer to end time
JohnDuprey May 5, 2026
61b891c
Fix image upload
Zacgoose May 5, 2026
364da37
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP-API into…
Zacgoose May 5, 2026
7787f18
Improve drift alignment data
Zacgoose May 5, 2026
08d2bcb
Add self-service email stuff
KelvinTegelaar May 5, 2026
733da22
updated
KelvinTegelaar May 5, 2026
e2382b4
fix: exclude expired user consent requests
JohnDuprey May 5, 2026
5087f26
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP-API into…
JohnDuprey May 5, 2026
45c8f59
Fix TeamsMeetingRecordingExpiration drift report showing Current=true
bmsimp May 3, 2026
512d87c
Fix SPFileRequests drift report showing pre-remediation values
bmsimp May 3, 2026
2be775b
Fix DisableSelfServiceLicenses autoclaim reading wrong property
bmsimp May 3, 2026
7aeeffc
Fix TeamsFederationConfiguration drift report ordering mismatch
bmsimp May 3, 2026
27c08ab
Fix SafeLinksPolicy and MalwareFilterPolicy drift report ordering
bmsimp May 3, 2026
212c6f1
improve drift page loading speed
Zacgoose May 6, 2026
0e537b1
fix: Guard against missing GeoIP.Data
JohnDuprey May 6, 2026
21528ea
parse timezone value for nice response message
Zacgoose May 6, 2026
23505c3
Correct backup object retuned
Zacgoose May 6, 2026
cc07ca5
public group standard
KelvinTegelaar May 6, 2026
9a84438
Empty AllowList Standard for CIS
KelvinTegelaar May 6, 2026
7962aab
add teasm ZAP standard
KelvinTegelaar May 6, 2026
94a291c
Ensure that collaboration invitations are sent to allowed domains only
KelvinTegelaar May 6, 2026
498d03f
fix: duplicate group ID retrieval in Invoke-ExecAddGDAPRole function
JohnDuprey May 6, 2026
9ae7562
Update Standard AutoAddProxy
Zacgoose May 7, 2026
adbbb53
Update CIPPTimers.json
Zacgoose May 7, 2026
3beb622
Better queue tracking
Zacgoose May 7, 2026
b02970f
Fix drift report inaccuracies for TeamsMeeting, SPFileRequests, and p…
KelvinTegelaar May 7, 2026
0bc436b
Fix handling of non-catalog null results in comparison function (#2034)
KelvinTegelaar May 7, 2026
02fdcbe
Feat: Extend ListIntunePolicy for admin templates (#2035)
KelvinTegelaar May 7, 2026
8e7392d
fix: scripted alert optimization
JohnDuprey May 7, 2026
731a41e
fix: ensure unique and non-null email addresses in report generation
JohnDuprey May 7, 2026
94158f4
Add Investigate status to custom tests
Zacgoose May 8, 2026
f20c60a
Revert escaping
Zacgoose May 8, 2026
318d826
fix: correct assignment syntax for FieldValue in Add-CIPPBPAField fun…
JohnDuprey May 8, 2026
51b2281
fix: add SharingCapability to current state retrieval in Invoke-CIPPS…
JohnDuprey May 8, 2026
7804aaf
Try infer template type from content if missing, else fail early
Zacgoose May 8, 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
15 changes: 15 additions & 0 deletions Config/CIPPTimers.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"Cron": "0 0 */12 * * *",
"Priority": 4,
"RunOnProcessor": true,
"TZOffset": true,
"PreferredProcessor": "standards"
},
{
Expand All @@ -87,6 +88,7 @@
"Cron": "0 15 */12 * * *",
"Priority": 5,
"RunOnProcessor": true,
"TZOffset": true,
"PreferredProcessor": "standards"
},
{
Expand Down Expand Up @@ -120,6 +122,7 @@
"Cron": "0 0 0 * * 0",
"Priority": 7,
"RunOnProcessor": true,
"TZOffset": true,
"IsSystem": true
},
{
Expand All @@ -137,6 +140,7 @@
"Description": "Orchestrator to process domains",
"Cron": "0 30 5 * * *",
"Priority": 22,
"TZOffset": true,
"RunOnProcessor": true
},
{
Expand All @@ -149,6 +153,7 @@
"Cron": "0 0 23 * * *",
"Priority": 10,
"RunOnProcessor": true,
"TZOffset": true,
"IsSystem": true
},
{
Expand All @@ -158,6 +163,7 @@
"Cron": "0 0 0 * * *",
"Priority": 10,
"RunOnProcessor": true,
"TZOffset": true,
"IsSystem": true
},
{
Expand All @@ -166,6 +172,7 @@
"Description": "Timer to process billing",
"Cron": "0 0 0 * * *",
"Priority": 12,
"TZOffset": true,
"RunOnProcessor": true
},
{
Expand All @@ -174,6 +181,7 @@
"Description": "Orchestrator to process BPA reports",
"Cron": "0 0 3 * * *",
"Priority": 10,
"TZOffset": true,
"RunOnProcessor": true
},
{
Expand All @@ -191,6 +199,7 @@
"Cron": "0 0 0 * * *",
"Priority": 15,
"RunOnProcessor": true,
"TZOffset": true,
"IsSystem": true
},
{
Expand All @@ -200,6 +209,7 @@
"Cron": "0 0 23 * * *",
"Priority": 20,
"RunOnProcessor": true,
"TZOffset": true,
"IsSystem": true
},
{
Expand All @@ -212,6 +222,7 @@
"Cron": "0 0 0 * * *",
"Priority": 20,
"RunOnProcessor": true,
"TZOffset": true,
"IsSystem": true
},
{
Expand All @@ -221,6 +232,7 @@
"Cron": "0 0 2 * * *",
"Priority": 21,
"RunOnProcessor": true,
"TZOffset": true,
"IsSystem": true
},
{
Expand All @@ -230,6 +242,7 @@
"Cron": "0 30 2 * * *",
"Priority": 22,
"RunOnProcessor": true,
"TZOffset": true,
"IsSystem": true
},
{
Expand All @@ -239,6 +252,7 @@
"Cron": "0 0 3 * * *",
"Priority": 23,
"RunOnProcessor": true,
"TZOffset": true,
"IsSystem": true
},
{
Expand All @@ -248,6 +262,7 @@
"Cron": "0 0 4 * * *",
"Priority": 24,
"RunOnProcessor": true,
"TZOffset": true,
"IsSystem": true
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ function Push-ListGraphRequestQueue {
Data = [string]$Json
}
Add-CIPPAzDataTableEntity @Table -Entity $GraphResults -Force | Out-Null

if ($env:CIPPNG -eq 'true') {
try {
[Craft.Services.CacheBridge]::InvalidateByScope('AllTenants')
} catch {
Write-Information "CacheBridge invalidation skipped: $($_.Exception.Message)"
}
}

return $true
} catch {
Write-Warning "Queue Error: $($_.Exception.Message)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ function Push-UpdatePermissionsQueue {
#>
param($Item)

try {
$DomainRefreshRequired = $false
$Status = 'Failed'
$FailureMessage = $null
$DomainRefreshRequired = $false

try {
if (!$Item.defaultDomainName) {
$DomainRefreshRequired = $true
}
Expand Down Expand Up @@ -46,33 +48,55 @@ function Push-UpdatePermissionsQueue {

if ($Item.defaultDomainName -ne 'PartnerTenant') {
Write-Information 'Pushing CIPP-SAM admin roles'
Set-CIPPSAMAdminRoles -TenantFilter $Item.customerId
try {
Set-CIPPSAMAdminRoles -TenantFilter $Item.customerId
} catch {
$SamRoleError = Get-CippException -Exception $_
Write-Information "Failed to set CIPP-SAM admin roles for $($Item.displayName): $($_.Exception.Message)"
Write-LogMessage -tenant $Item.defaultDomainName -tenantId $Item.customerId -message "Failed to set CIPP-SAM admin roles for $($Item.displayName) - $($_.Exception.Message)" -Sev 'Warning' -API 'UpdatePermissionsQueue' -LogData $SamRoleError
if ($Status -eq 'Success') {
$Status = 'Failed'
$FailureMessage = "Set-CIPPSAMAdminRoles: $($_.Exception.Message)"
}
}
}

$Table = Get-CIPPTable -TableName cpvtenants
$unixtime = [int64](([datetime]::UtcNow) - (Get-Date '1/1/1970')).TotalSeconds
$GraphRequest = @{
LastApply = "$unixtime"
LastStatus = "$Status"
applicationId = "$($env:ApplicationID)"
Tenant = "$($Item.customerId)"
PartitionKey = 'Tenant'
RowKey = "$($Item.customerId)"
} catch {
Write-Information "Error updating permissions for $($Item.displayName): $($_.Exception.Message)"
Write-Information $_.InvocationInfo.PositionMessage
Write-LogMessage -tenant $Item.defaultDomainName -tenantId $Item.customerId -message "Error updating permissions for $($Item.displayName) - $($_.Exception.Message)" -Sev 'Error' -API 'UpdatePermissionsQueue' -LogData (Get-CippException -Exception $_)
$Status = 'Failed'
if (-not $FailureMessage) {
$FailureMessage = $_.Exception.Message
}
if ($PermissionFailures) {
$GraphRequest.LastError = $FailureMessage
} finally {
try {
$CpvTable = Get-CIPPTable -TableName cpvtenants
$unixtime = [int64](([datetime]::UtcNow) - (Get-Date '1/1/1970')).TotalSeconds
$GraphRequest = @{
LastApply = "$unixtime"
LastStatus = "$Status"
applicationId = "$($env:ApplicationID)"
Tenant = "$($Item.customerId)"
PartitionKey = 'Tenant'
RowKey = "$($Item.customerId)"
}
if ($FailureMessage) {
$GraphRequest.LastError = "$FailureMessage"
}
Add-CIPPAzDataTableEntity @CpvTable -Entity $GraphRequest -Force
} catch {
Write-Information "Failed to persist cpvtenants row for $($Item.displayName): $($_.Exception.Message)"
}
Add-CIPPAzDataTableEntity @Table -Entity $GraphRequest -Force

if ($DomainRefreshRequired) {
$UpdatedTenant = Get-Tenants -TenantFilter $Item.customerId -TriggerRefresh
if ($UpdatedTenant.defaultDomainName) {
Write-Information "Updated tenant domains $($UpdatedTenant.defaultDomainName)"
try {
$UpdatedTenant = Get-Tenants -TenantFilter $Item.customerId -TriggerRefresh
if ($UpdatedTenant.defaultDomainName) {
Write-Information "Updated tenant domains $($UpdatedTenant.defaultDomainName)"
}
} catch {
Write-Information "Failed to refresh tenant domains for $($Item.displayName): $($_.Exception.Message)"
}
}
} catch {
Write-Information "Error updating permissions for $($Item.displayName): $($_.Exception.Message)"
Write-Information $_.InvocationInfo.PositionMessage
Write-LogMessage -tenant $Item.defaultDomainName -tenantId $Item.customerId -message "Error updating permissions for $($Item.displayName) - $($_.Exception.Message)" -Sev 'Error' -API 'UpdatePermissionsQueue' -LogData (Get-CippException -Exception $_)
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Push-CIPPTestsList {

# Emit one task per suite — suite names must match the ValidateSet in Invoke-CIPPTestCollection.
# Function discovery happens inside Invoke-CIPPTestCollection via Get-Command (path-independent).
$Suites = @('ZTNA', 'ORCA', 'EIDSCA', 'CISA', 'CIS', 'CopilotReadiness', 'GenericTests', 'Custom')
$Suites = @('ZTNA', 'ORCA', 'EIDSCA', 'CISA', 'CIS', 'SMB1001', 'CopilotReadiness', 'GenericTests', 'Custom')

$Tasks = foreach ($Suite in $Suites) {
[PSCustomObject]@{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ function Get-CIPPAlertIntunePolicyConflicts {
return
}

$AlertableStatuses = @()
if ($Config.AlertErrors) { $AlertableStatuses += 'error', 'failed' }
if ($Config.AlertConflicts) { $AlertableStatuses += 'conflict' }
$AlertableStatuses = @(
if ($Config.AlertErrors) { 'error'; 'failed' }
if ($Config.AlertConflicts) { 'conflict' }
)

if (-not $AlertableStatuses) {
return
Expand All @@ -68,7 +69,7 @@ function Get-CIPPAlertIntunePolicyConflicts {
return
}

$Issues = @()
$Issues = [System.Collections.Generic.List[object]]::new()

if ($Config.IncludePolicies) {
try {
Expand All @@ -77,16 +78,16 @@ function Get-CIPPAlertIntunePolicyConflicts {
foreach ($Device in $ManagedDevices) {
$PolicyStates = $Device.deviceConfigurationStates | Where-Object { $_.state -and ($AlertableStatuses -contains $_.state) }
foreach ($State in $PolicyStates) {
$Issues += [PSCustomObject]@{
Message = "Policy '$($State.displayName)' is $($State.state) on device '$($Device.deviceName)' for $($Device.userPrincipalName)."
Tenant = $TenantFilter
Type = 'Policy'
PolicyName = $State.displayName
IssueStatus = $State.state
DeviceName = $Device.deviceName
UserPrincipalName = $Device.userPrincipalName
DeviceId = $Device.id
}
$Issues.Add([PSCustomObject]@{
Message = "Policy '$($State.displayName)' is $($State.state) on device '$($Device.deviceName)' for $($Device.userPrincipalName)."
Tenant = $TenantFilter
Type = 'Policy'
PolicyName = $State.displayName
IssueStatus = $State.state
DeviceName = $Device.deviceName
UserPrincipalName = $Device.userPrincipalName
DeviceId = $Device.id
})
}
}
} catch {
Expand All @@ -105,16 +106,16 @@ function Get-CIPPAlertIntunePolicyConflicts {
}

foreach ($Status in $BadStatuses) {
$Issues += [PSCustomObject]@{
Message = "App '$($App.displayName)' install is $($Status.installState) on device '$($Status.deviceName)' for $($Status.userPrincipalName)."
Tenant = $TenantFilter
Type = 'Application'
AppName = $App.displayName
IssueStatus = $Status.installState
DeviceName = $Status.deviceName
UserPrincipalName = $Status.userPrincipalName
DeviceId = $Status.deviceId
}
$Issues.Add([PSCustomObject]@{
Message = "App '$($App.displayName)' install is $($Status.installState) on device '$($Status.deviceName)' for $($Status.userPrincipalName)."
Tenant = $TenantFilter
Type = 'Application'
AppName = $App.displayName
IssueStatus = $Status.installState
DeviceName = $Status.deviceName
UserPrincipalName = $Status.userPrincipalName
DeviceId = $Status.deviceId
})
}
}
} catch {
Expand All @@ -132,11 +133,11 @@ function Get-CIPPAlertIntunePolicyConflicts {
$AppCount = ($Issues | Where-Object { $_.Type -eq 'Application' }).Count

$AlertData = @([PSCustomObject]@{
Message = "Found $PolicyCount policy issues and $AppCount application issues in Intune."
Tenant = $TenantFilter
PolicyIssues = $PolicyCount
AppIssues = $AppCount
Issues = $Issues
Message = "Found $PolicyCount policy issues and $AppCount application issues in Intune."
Tenant = $TenantFilter
PolicyIssues = $PolicyCount
AppIssues = $AppCount
Issues = $Issues
})
} else {
$AlertData = $Issues
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function Get-CIPPAlertNewAppApproval {
)

try {
$Approvals = New-GraphGetRequest -Uri "https://graph.microsoft.com/beta/identityGovernance/appConsent/appConsentRequests?`$top=100&`$filter=userConsentRequests/any (u:u/status eq 'InProgress')" -tenantid $TenantFilter
$Approvals = New-GraphGetRequest -Uri "https://graph.microsoft.com/beta/identityGovernance/appConsent/appConsentRequests?`$top=100&`$filter=userConsentRequests/any(u:u/status eq 'InProgress')" -tenantid $TenantFilter

if ($Approvals.count -gt 0) {
$TenantGUID = (Get-Tenants -TenantFilter $TenantFilter -SkipDomains).customerId
Expand All @@ -24,6 +24,9 @@ function Get-CIPPAlertNewAppApproval {
$userConsentRequests = New-GraphGetRequest -Uri "https://graph.microsoft.com/v1.0/identityGovernance/appConsent/appConsentRequests/$($App.id)/userConsentRequests" -tenantid $TenantFilter

$userConsentRequests | ForEach-Object {
if ($_.status -eq 'Expired') {
return
}
$consentUrl = if ($App.consentType -eq 'Static') {
# if something is going wrong here you've probably stumbled on a fourth variation - rvdwegen
"https://login.microsoftonline.com/$($TenantFilter)/adminConsent?client_id=$($App.appId)&bf_id=$($App.id)&redirect_uri=https://entra.microsoft.com/TokenAuthorize"
Expand Down
2 changes: 1 addition & 1 deletion Modules/CIPPCore/Public/Add-CIPPBPAField.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function Add-CIPPBPAField {
$Result[$fieldName] = [string]$JsonString
}
'string' {
$Result[$fieldName], [string]$FieldValue
$Result[$fieldName] = [string]$FieldValue
}
}
Add-CIPPAzDataTableEntity @Table -Entity $Result -Force
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function New-CippAuditLogSearch {
$SearchParams = @{
displayName = $DisplayName
filterStartDateTime = $StartTime.ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ss')
filterEndDateTime = $EndTime.AddHours(1).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ss')
filterEndDateTime = $EndTime.ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ss')
}
if ($OperationsFilters) {
$SearchParams.operationFilters = @($OperationsFilters)
Expand Down
1 change: 1 addition & 0 deletions Modules/CIPPCore/Public/CippQueue/New-CippQueueEntry.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function New-CippQueueEntry {
}

if ($env:CIPPNG -eq 'true') {
[Craft.Services.QueueStatusBridge]::RegisterQueueMetadata($QueueEntry.RowKey, $Name, $Link, $Reference)
return $QueueEntry
}

Expand Down
2 changes: 1 addition & 1 deletion Modules/CIPPCore/Public/Compare-CIPPIntuneObject.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function Compare-CIPPIntuneObject {
[Parameter(Mandatory = $false)]
[string[]]$CompareType = @()
)
if ($CompareType -ne 'Catalog') {
if ($CompareType -notcontains 'Catalog') {
$defaultExcludeProperties = @(
'id',
'createdDateTime',
Expand Down
Loading