Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
368d857
add pendinginput to var
KelvinTegelaar Jul 19, 2025
35f7af5
Fixed
KelvinTegelaar Jul 21, 2025
7107bb6
fix issue with CA template editing
KelvinTegelaar Jul 22, 2025
b2e27d3
Fix URL in Invoke-NinjaOneTenantSync.ps1
STG-Tanner Jul 22, 2025
abd014a
catch exceptions for test-cippaccess and return unauthorized
JohnDuprey Jul 22, 2025
639c690
fix breach check exec ution
KelvinTegelaar Jul 23, 2025
2dfa809
fix: update state retrieval and logging message for CloudMessageRecall
kris6673 Jul 23, 2025
b7f016f
CAAccessTemplates
KelvinTegelaar Jul 23, 2025
4dee69b
Fixed CA compare
KelvinTegelaar Jul 23, 2025
f5f8ed7
compare ca policy
KelvinTegelaar Jul 23, 2025
2952c31
fix blocked for spam displaying being inverted, and also invalid para…
kris6673 Jul 23, 2025
9f76be4
WORDS
kris6673 Jul 23, 2025
2a820fd
Minor formatting and flip the null check
kris6673 Jul 23, 2025
0a8b548
update ca policy deployment
KelvinTegelaar Jul 23, 2025
8d85f24
fix variable casing and improve error handling in Add-CIPPAlias function
kris6673 Jul 23, 2025
e835c59
Add missing state and otherMails property, fix casing, add set sponso…
kris6673 Jul 23, 2025
ed97a0e
allow partner tenant lookups
JohnDuprey Jul 23, 2025
b2cde73
fix payload for add/edit user
JohnDuprey Jul 23, 2025
5235926
Merge branch 'dev' into fix-minor-issues
JohnDuprey Jul 23, 2025
701357c
Merge pull request #1565 from kris6673/fix-minor-issues
JohnDuprey Jul 23, 2025
e7baa77
Merge pull request #1562 from STG-Tanner/dev
JohnDuprey Jul 23, 2025
2c5679e
Merge pull request #1563 from kris6673/fix-input-validation-cloud-mes…
JohnDuprey Jul 23, 2025
a851931
Merge pull request #1564 from kris6673/fix-archive-and-blockedForSpam
JohnDuprey Jul 23, 2025
9b53353
fix issue loading scheduler with corrupt data
JohnDuprey Jul 24, 2025
a1591da
suppress extra output
JohnDuprey Jul 24, 2025
e906274
update to newest license files
kris6673 Jul 24, 2025
625675b
catch bobby tables exception on breaches
JohnDuprey Jul 24, 2025
6498a41
search tweaks
JohnDuprey Jul 24, 2025
ca57d38
allow other pending statuses in capability check
JohnDuprey Jul 24, 2025
63f39b3
sort search results
JohnDuprey Jul 24, 2025
7a63fe1
delta queries
JohnDuprey Jul 25, 2025
585e58f
patch user endpoint
Jul 25, 2025
77cc79b
Update New-GraphGetRequest.ps1
JohnDuprey Jul 25, 2025
a69844a
audit log tweaks
JohnDuprey Jul 25, 2025
35f4170
logging
JohnDuprey Jul 25, 2025
7f877d5
fixed policyMigrationState for 'new' tenants where is completed by de…
ngms-psh Jul 27, 2025
cffa2d1
Added error message if the request does not return any data.
ngms-psh Jul 27, 2025
7730882
Fix EXO Duplicate Identity Error
ngms-psh Jul 27, 2025
00eea6a
Update Invoke-ListDirectoryObjects.ps1
JohnDuprey Jul 27, 2025
7abcdc6
Patch user endpoint, no verbose
Jul 28, 2025
1056fa3
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP-API into…
Jul 28, 2025
8491835
Bulk the patch user endpoint
Jul 28, 2025
15cd3bb
intunewin helpers
JohnDuprey Jul 28, 2025
44e2547
fix graph presets endpoint
JohnDuprey Jul 28, 2025
ff3fbf6
implements drift standards
KelvinTegelaar Jul 28, 2025
f30527b
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP-API into…
KelvinTegelaar Jul 28, 2025
41cb7f9
change how drift detection works
KelvinTegelaar Jul 28, 2025
d4e30a7
Extra info for pending app approvals
Zacgoose Jul 29, 2025
4e407e0
Fixed CIPPOffboardingJob missing $DisplayName for the -DisplayName param
Zacgoose Jul 29, 2025
f5929c0
Better exception message handling for failed json conversion
Zacgoose Jul 29, 2025
13c0523
expand groups
KelvinTegelaar Jul 29, 2025
e3d49ba
Merge pull request #1570 from Zacgoose/CIPPOffboardingJob-fix
KelvinTegelaar Jul 29, 2025
bbd4dea
fixes incorrect drift measurements
KelvinTegelaar Jul 29, 2025
5c1822b
Add the ID of the consent request to output to enable client deduplic…
dszp Jul 29, 2025
87fb051
fix bug
KelvinTegelaar Jul 29, 2025
08ade0c
check for empty allowlist arrays in spoofwarn
JohnDuprey Jul 29, 2025
12b7fc5
Feat: Add securityEnabled field switch
kris6673 Jul 29, 2025
1051a2c
Work so far
KelvinTegelaar Jul 29, 2025
489a32a
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP-API into…
KelvinTegelaar Jul 29, 2025
5ade4e1
fix issue with multiple templates run at the same time
JohnDuprey Jul 29, 2025
3c432bb
filter to the correct standards report
JohnDuprey Jul 29, 2025
8ae4a14
Enhance mailbox permission modification and bulk request tracking
Zacgoose Jul 30, 2025
a2d86cc
Add Invoke-CIPPStandardSPFileRequests function
Zacgoose Jul 30, 2025
1a67b7e
Merge pull request #1573 from kris6673/issue4480
JohnDuprey Jul 30, 2025
f84f772
update permissions for app manifests when updates are detected
JohnDuprey Jul 30, 2025
59eb5f1
fix restore logging
JohnDuprey Jul 30, 2025
fff114c
prep for drift emailing
KelvinTegelaar Jul 30, 2025
2d398e7
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP-API into…
KelvinTegelaar Jul 30, 2025
c906c4e
fix denied bug
KelvinTegelaar Jul 30, 2025
37e7435
update drift settings
KelvinTegelaar Jul 30, 2025
b950f2e
updates to drift management
KelvinTegelaar Jul 30, 2025
f9faf88
hsitory timeline for tenant
KelvinTegelaar Jul 30, 2025
da19911
apiname bug
KelvinTegelaar Jul 30, 2025
53f6dfe
disabled
KelvinTegelaar Jul 30, 2025
da6880c
fix webhook alerts
JohnDuprey Jul 31, 2025
1346baf
Re-bulk listlogs
Jul 31, 2025
d245212
Merge pull request #1572 from dszp/consentRequestAlertAddRequestID
KelvinTegelaar Jul 31, 2025
5928a01
Merge pull request #1571 from Zacgoose/bulk-requests-json-parsing
KelvinTegelaar Jul 31, 2025
b23a66a
Merge pull request #1569 from Zacgoose/appapprovalinfo
KelvinTegelaar Jul 31, 2025
186ec9f
Merge pull request #1568 from ngms-psh/fix-exoDuplicateIdentity
KelvinTegelaar Jul 31, 2025
0345b5c
Merge pull request #1567 from ngms-psh/fix-AuthMethodsPolicyMigration…
KelvinTegelaar Jul 31, 2025
e113e57
Merge pull request #1566 from kris6673/even-more-licenses
KelvinTegelaar Jul 31, 2025
2cb186b
chore: add try catch to CurrentState
OfficialEsco Jul 30, 2025
8f1801e
Update Invoke-CIPPStandardSPFileRequests.ps1
Zacgoose Jul 31, 2025
ebb3bf3
autoremediate true thing
KelvinTegelaar Jul 31, 2025
67e22b5
drift management timer
JohnDuprey Jul 31, 2025
c849931
log tweak
JohnDuprey Jul 31, 2025
4c38523
magic to fix microsoft casing issue
JohnDuprey Jul 31, 2025
249ce2f
fix tenantfilter
JohnDuprey Jul 31, 2025
bd6a52b
add text replacement and max character limits to device rename
JohnDuprey Jul 31, 2025
208ab11
fixes remediation
KelvinTegelaar Jul 31, 2025
1b6cedd
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP-API into…
KelvinTegelaar Jul 31, 2025
88d169a
remove drift param
JohnDuprey Jul 31, 2025
6ac8021
Add delete CA
KelvinTegelaar Aug 1, 2025
c34f132
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP-API into…
KelvinTegelaar Aug 1, 2025
dbfa4ed
chore: update alert object
OfficialEsco Aug 1, 2025
7dd5581
LicenseAssignmentErrors alert
Aug 1, 2025
baa663e
prerelease push
KelvinTegelaar Aug 1, 2025
fe6bee8
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP-API into…
KelvinTegelaar Aug 1, 2025
a812c13
email bug fix
KelvinTegelaar Aug 1, 2025
d523823
casing
KelvinTegelaar Aug 1, 2025
6da79b1
Merge pull request #1577 from Ren-Roros-Digital/alertobject
KelvinTegelaar Aug 1, 2025
56225b8
Merge pull request #1576 from Ren-Roros-Digital/trycatch
KelvinTegelaar Aug 1, 2025
6456474
Merge pull request #1575 from Zacgoose/spo-file-requests
KelvinTegelaar Aug 1, 2025
a64b95e
Merge pull request #1574 from Zacgoose/bulk-mailbox-perms
KelvinTegelaar Aug 1, 2025
ec60ee4
add %initialdomain% replace
JohnDuprey Aug 1, 2025
4a0f291
Add missing logging
Aug 1, 2025
4c393ba
up version
KelvinTegelaar Aug 1, 2025
56654ae
Merge pull request #1578 from KelvinTegelaar/dev
KelvinTegelaar Aug 1, 2025
bf1b456
push
KelvinTegelaar Aug 1, 2025
f8a29d4
Merge pull request #1579 from KelvinTegelaar/dev
KelvinTegelaar Aug 1, 2025
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
28 changes: 14 additions & 14 deletions AddMSPApp/datto.app.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<ApplicationInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ToolVersion="1.8.3.0">
<Name>install.ps1</Name>
<UnencryptedContentSize>705</UnencryptedContentSize>
<FileName>datto.intunewin</FileName>
<SetupFile>install.ps1</SetupFile>
<EncryptionInfo>
<EncryptionKey>sL/LP/JZ4F4cBSykm6usgJoV1PMoqd62C6JUwuo2z24=</EncryptionKey>
<MacKey>PEpeqeoX7jAWxb0xHGfCkKFxh4/YRfoMTVXrP+uZWzM=</MacKey>
<InitializationVector>ulFPA+vYjaxX0pvq0BMAKQ==</InitializationVector>
<Mac>28ZFU4AT1OznwF8pfqO8i+WFUNSf9024H4Jw2H7UJWs=</Mac>
<ProfileIdentifier>ProfileVersion1</ProfileIdentifier>
<FileDigest>YEb+QNQCko/uZyedA+JfcP/RDm+nZOIjFN04CfhwN4c=</FileDigest>
<FileDigestAlgorithm>SHA256</FileDigestAlgorithm>
</EncryptionInfo>
<ApplicationInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ToolVersion="1.8.3.0">
<Name>install.ps1</Name>
<UnencryptedContentSize>693</UnencryptedContentSize>
<FileName>datto.intunewin</FileName>
<SetupFile>install.ps1</SetupFile>
<EncryptionInfo>
<EncryptionKey>jobB9Ga7J3CbO6acWJyvBRE56nFXwqGfcnGfZRMsJC4=</EncryptionKey>
<MacKey>53SOzs0l6Po2btsGFSMZgkV8vwhH+PxTN8BZDUcfWfg=</MacKey>
<InitializationVector>VjM/osrvPElbu79J+mdXuw==</InitializationVector>
<Mac>UZZXO53Np/tG6Ms+qvwLcNOeD1GRH6NRPFg/TuMz39M=</Mac>
<ProfileIdentifier>ProfileVersion1</ProfileIdentifier>
<FileDigest>KtAWAl29064LG0eyDinbDs0JUbK+EK7GsJovu8obBM4=</FileDigest>
<FileDigestAlgorithm>SHA256</FileDigestAlgorithm>
</EncryptionInfo>
</ApplicationInfo>
Binary file modified AddMSPApp/datto.intunewin
Binary file not shown.
11 changes: 10 additions & 1 deletion CIPPTimers.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@
"RunOnProcessor": true,
"PreferredProcessor": "standards"
},
{
"Id": "4d80205c-674d-4fc1-abeb-a1ec37e0d796",
"Command": "Start-DriftStandardsOrchestrator",
"Description": "Orchestrator to process drift standards",
"Cron": "0 0 */1 * * *",
"Priority": 5,
"RunOnProcessor": true,
"PreferredProcessor": "standards"
},
{
"Id": "97145a1d-28f0-4bb2-b929-5a43517d23cc",
"Command": "Start-SchedulerOrchestrator",
Expand Down Expand Up @@ -197,4 +206,4 @@
"RunOnProcessor": true,
"IsSystem": true
}
]
]
95 changes: 95 additions & 0 deletions ConversionTable.csv

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions Modules/CIPPCore/Public/Add-CIPPAlias.ps1
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
function Add-CIPPAlias {
[CmdletBinding()]
param (
$user,
$User,
$Aliases,
$UserprincipalName,
$UserPrincipalName,
$TenantFilter,
$APIName = 'Add Alias',
$Headers
)

try {
foreach ($Alias in $Aliases) {
Write-Host "Adding alias $Alias to $user"
New-GraphPostRequest -uri "https://graph.microsoft.com/beta/users/$user" -tenantid $TenantFilter -type 'patch' -body "{`"mail`": `"$Alias`"}" -verbose
Write-Host "Adding alias $Alias to $User"
New-GraphPostRequest -uri "https://graph.microsoft.com/beta/users/$User" -tenantid $TenantFilter -type 'patch' -body "{`"mail`": `"$Alias`"}" -verbose
}
Write-Host "Resetting primary alias to $User"
New-GraphPostRequest -uri "https://graph.microsoft.com/beta/users/$($user)" -tenantid $TenantFilter -type 'patch' -body "{`"mail`": `"$User`"}" -verbose
Write-LogMessage -headers $Headers -API $APINAME -tenant $($TenantFilter) -message "Added alias $($Alias) to $($UserprincipalName)" -Sev 'Info'
New-GraphPostRequest -uri "https://graph.microsoft.com/beta/users/$User" -tenantid $TenantFilter -type 'patch' -body "{`"mail`": `"$User`"}" -verbose
Write-LogMessage -headers $Headers -API $APIName -tenant $($TenantFilter) -message "Added alias $($Alias) to $($UserPrincipalName)" -Sev 'Info'
return ("Added Aliases: $($Aliases -join ',')")
} catch {
Write-LogMessage -headers $Headers -API $APINAME -tenant $($TenantFilter) -message "Failed to set alias. Error:$($_.Exception.Message)" -Sev 'Error'
throw "Failed to set alias: $($_.Exception.Message)"
$ErrorMessage = Get-CippException -Exception $_
Write-LogMessage -headers $Headers -API $APIName -tenant $($TenantFilter) -message "Failed to set alias. Error:$($ErrorMessage.NormalizedError)" -Sev 'Error' -LogData $ErrorMessage
throw "Failed to set alias: $($ErrorMessage.NormalizedError)"
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
function Get-CIPPAlertLicenseAssignmentErrors {
<#
.FUNCTIONALITY
Entrypoint
#>
[CmdletBinding()]
Param (
[Parameter(Mandatory)]
$TenantFilter,
[Alias('input')]
$InputValue
)

# Define error code translations for human-readable messages
$ErrorTranslations = @(
@{
ErrorCode = "CountViolation"
Description = "Not enough licenses available - the organization has exceeded the number of available licenses for this SKU"
},
@{
ErrorCode = "MutuallyExclusiveViolation"
Description = "Conflicting licenses assigned - this license cannot be assigned alongside another license the user already has"
},
@{
ErrorCode = "ProhibitedInUsageLocationViolation"
Description = "License not available in user's location - this license cannot be assigned to users in the user's current usage location"
},
@{
ErrorCode = "UniquenessViolation"
Description = "Duplicate license assignment - this license can only be assigned once per user"
},
@{
ErrorCode = "Unknown"
Description = "Unknown license assignment error - an unspecified error occurred during license assignment"
}
)

try {
# Get all users with license assignment states from Graph API
$Users = New-GraphGetRequest -uri "https://graph.microsoft.com/beta/users?`$select=id,userPrincipalName,displayName,licenseAssignmentStates&`$top=999" -tenantid $TenantFilter

# Filter users who have license assignment violations
$UsersWithViolations = $Users | Where-Object {
$_.licenseAssignmentStates -and
($_.licenseAssignmentStates | Where-Object {
$_.error -and (
$_.error -like "*CountViolation*" -or
$_.error -like "*MutuallyExclusiveViolation*" -or
$_.error -like "*ProhibitedInUsageLocationViolation*" -or
$_.error -like "*UniquenessViolation*" -or
$_.error -like "*Unknown*"
)
})
}

# Build alert messages for users with violations
$LicenseAssignmentErrors = foreach ($User in $UsersWithViolations) {
$ViolationErrors = $User.licenseAssignmentStates | Where-Object {
$_.error -and (
$_.error -like "*CountViolation*" -or
$_.error -like "*MutuallyExclusiveViolation*" -or
$_.error -like "*ProhibitedInUsageLocationViolation*" -or
$_.error -like "*UniquenessViolation*" -or
$_.error -like "*Unknown*"
)
}

foreach ($Violation in $ViolationErrors) {
# Find matching error translation
$ErrorTranslation = $ErrorTranslations | Where-Object { $Violation.error -like "*$($_.ErrorCode)*" } | Select-Object -First 1
$HumanReadableError = if ($ErrorTranslation) {
$ErrorTranslation.Description
} else {
"Unknown license assignment error: $($Violation.error)"
}

$PrettyName = Convert-SKUname -skuID $Violation.skuId

"$($User.userPrincipalName): $HumanReadableError (License: $PrettyName)"
}
}

# If errors are found, write alert
if ($LicenseAssignmentErrors) {
Write-AlertTrace -cmdletName $MyInvocation.MyCommand -tenantFilter $TenantFilter -data $LicenseAssignmentErrors
}

} catch {
Write-LogMessage -message "Failed to check license assignment errors: $($_.exception.message)" -API 'License Assignment Alerts' -tenant $TenantFilter -sev Error
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function Get-CIPPAlertNewAppApproval {
try {
$Approvals = New-GraphGetRequest -Uri "https://graph.microsoft.com/beta/identityGovernance/appConsent/appConsentRequests?`$filter=userConsentRequests/any (u:u/status eq 'InProgress')" -tenantid $TenantFilter
if ($Approvals.count -gt 0) {
$TenantGUID = (Get-Tenants -TenantFilter $TenantFilter -SkipDomains).customerId
$AlertData = [System.Collections.Generic.List[PSCustomObject]]::new()
foreach ($App in $Approvals) {
$userConsentRequests = New-GraphGetRequest -Uri "https://graph.microsoft.com/v1.0/identityGovernance/appConsent/appConsentRequests/$($App.id)/userConsentRequests" -tenantid $TenantFilter
Expand All @@ -29,13 +30,17 @@ function Get-CIPPAlertNewAppApproval {
}

$Message = [PSCustomObject]@{
RequestId = $_.id
AppName = $App.appDisplayName
RequestUser = $_.createdBy.user.userPrincipalName
Reason = $_.reason
RequestDate = $_.createdDateTime
Status = $_.status # Will allways be InProgress as we filter to only get these but this will reduce confusion when an alert is generated
AppId = $App.appId
Scopes = ($App.pendingScopes.displayName -join ', ')
ConsentURL = $consentUrl
Tenant = $TenantFilter
TenantId = $TenantGUID
}
$AlertData.Add($Message)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ function Get-CippAuditLogSearchResults {
$GraphRequest.CountOnly = $true
}

New-GraphGetRequest @GraphRequest -ErrorAction Stop
New-GraphGetRequest @GraphRequest -ErrorAction Stop | Sort-Object -Property createdDateTime -Descending
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function New-CippAuditLogSearch {
)

$SearchParams = @{
displayName = 'CIPP Audit Search - ' + (Get-Date).ToString('yyyy-MM-dd HH:mm:ss')
displayName = $DisplayName
filterStartDateTime = $StartTime.ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ss')
filterEndDateTime = $EndTime.AddHours(1).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ss')
}
Expand Down
Loading