Skip to content

Commit 7b63958

Browse files
authored
Merge pull request #105 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents 8bb0212 + 11de9ef commit 7b63958

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

Modules/CIPPCore/Public/AuditLogs/New-CIPPAuditLogSearchResultsCache.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ function New-CIPPAuditLogSearchResultsCache {
2626
}
2727
} catch {
2828
Write-Information "Error checking for failed downloads: $($_.Exception.Message)"
29-
# Continue with the process even if the rerun protection check fails
3029
}
3130

3231
try {
@@ -75,7 +74,7 @@ function New-CIPPAuditLogSearchResultsCache {
7574
$FailedDownloadsTable = Get-CippTable -TableName 'FailedAuditLogDownloads'
7675
$failedEntities = Get-CIPPAzDataTableEntity @FailedDownloadsTable -Filter "PartitionKey eq '$TenantFilter' and SearchId eq '$SearchId'"
7776
if ($failedEntities) {
78-
Remove-CIPPAzDataTableEntity @FailedDownloadsTable -Entity $entity
77+
Remove-AzDataTableEntity @FailedDownloadsTable -Entity $entity
7978
Write-Information "Removed failed download records for search ID: $SearchId, tenant: $TenantFilter"
8079
}
8180
} catch {

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Users/Invoke-EditUser.ps1

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,14 @@ Function Invoke-EditUser {
140140
if ($AddToGroups) {
141141
$AddToGroups | ForEach-Object {
142142

143-
$GroupType = $_.value.groupType -join ','
144-
$GroupID = $_.value.groupid
145-
$GroupName = $_.value.groupName
143+
$GroupType = $_.addedFields.calculatedGroupType
144+
$GroupID = $_.value
145+
$GroupName = $_.label
146146
Write-Host "About to add $($UserObj.userPrincipalName) to $GroupName. Group ID is: $GroupID and type is: $GroupType"
147147

148148
try {
149149

150150
if ($GroupType -eq 'Distribution list' -or $GroupType -eq 'Mail-Enabled Security') {
151-
152151
Write-Host 'Adding to group via Add-DistributionGroupMember '
153152
$Params = @{ Identity = $GroupID; Member = $UserObj.id; BypassSecurityGroupManagerCheck = $true }
154153
$null = New-ExoRequest -tenantid $UserObj.tenantFilter -cmdlet 'Add-DistributionGroupMember' -cmdParams $params -UseSystemMailbox $true

Modules/CIPPCore/Public/Entrypoints/Timer Functions/Start-TableCleanup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function Start-TableCleanup {
1717
@{
1818
DataTableProps = @{
1919
Context = (Get-CIPPTable -tablename 'AuditLogSearches').Context
20-
Filter = "Timestamp lt datetime'$((Get-Date).AddDays(-7).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ'))'"
20+
Filter = "Timestamp lt datetime'$((Get-Date).AddDays(-1).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ'))'"
2121
First = 10000
2222
Property = @('PartitionKey', 'RowKey', 'ETag')
2323
}

Modules/CIPPCore/Public/Webhooks/Test-CIPPAuditLogRules.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function Test-CIPPAuditLogRules {
5555
if ($LogCount -gt 0) {
5656
$LocationTable = Get-CIPPTable -TableName 'knownlocationdb'
5757
$ProcessedData = foreach ($AuditRecord in $SearchResults) {
58-
Write-Host "Auditlogs: The record is $($AuditRecord.operation) - $($TenantFilter)"
58+
#Write-Host "Auditlogs: The record is $($AuditRecord.operation) - $($TenantFilter)"
5959
$RootProperties = $AuditRecord | Select-Object * -ExcludeProperty auditData
6060
$Data = $AuditRecord.auditData | Select-Object *, CIPPAction, CIPPClause, CIPPGeoLocation, CIPPBadRepIP, CIPPHostedIP, CIPPIPDetected, CIPPLocationInfo, CIPPExtendedProperties, CIPPDeviceProperties, CIPPParameters, CIPPModifiedProperties, AuditRecord -ErrorAction SilentlyContinue
6161
try {

0 commit comments

Comments
 (0)