Skip to content

Commit a4b81a2

Browse files
authored
Merge pull request #463 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents 35f2e10 + 7bb4512 commit a4b81a2

File tree

8 files changed

+20
-15
lines changed

8 files changed

+20
-15
lines changed

Modules/CIPPCore/Public/Entrypoints/Activity Triggers/BEC/Push-BECRun.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ function Push-BECRun {
144144
$GraphResults = New-GraphBulkRequest -Requests $Requests -tenantid $TenantFilter -asapp $true
145145

146146
$PasswordChanges = (($GraphResults | Where-Object { $_.id -eq 'Users' }).body.value | Where-Object { $_.lastPasswordChangeDateTime -ge $startDate }) ?? @()
147-
$NewUsers = ($GraphResults | Where-Object { $_.id -eq 'Users' }).body.value | Where-Object { $_.createdDateTime -ge $startDate } ?? @()
147+
$NewUsers = (($GraphResults | Where-Object { $_.id -eq 'Users' }).body.value | Where-Object { $_.createdDateTime -ge $startDate }) ?? @()
148148
$MFADevices = ($GraphResults | Where-Object { $_.id -eq 'MFADevices' }).body.value ?? @()
149149
$NewSPs = ($GraphResults | Where-Object { $_.id -eq 'NewSPs' }).body.value ?? @()
150150

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Email-Exchange/Administration/Invoke-ListMailboxes.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using namespace System.Net
22

3-
Function Invoke-ListMailboxes {
3+
function Invoke-ListMailboxes {
44
<#
55
.FUNCTIONALITY
66
Entrypoint
@@ -73,7 +73,7 @@ Function Invoke-ListMailboxes {
7373
LitigationHoldEnabled,
7474
LitigationHoldDate,
7575
LitigationHoldDuration,
76-
@{ Name = 'LicensedForLitigationHold'; Expression = { ($_.PersistedCapabilities -contains 'BPOS_S_DlpAddOn' -or $_.PersistedCapabilities -contains 'BPOS_S_Enterprise') } },
76+
@{ Name = 'LicensedForLitigationHold'; Expression = { ($_.PersistedCapabilities -contains 'EXCHANGE_S_ARCHIVE_ADDON' -or $_.PersistedCapabilities -contains 'EXCHANGE_S_ENTERPRISE') } },
7777
ComplianceTagHoldApplied,
7878
RetentionHoldEnabled,
7979
InPlaceHolds,

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Endpoint/MEM/Invoke-EditIntuneScript.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ function Invoke-EditIntuneScript {
7373
}
7474
'PATCH' {
7575
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
76-
StatusCode = [HttpStatusCode]::BadRequest
77-
Body = "Method $($Request.Method) is not supported."
78-
})
76+
StatusCode = [HttpStatusCode]::BadRequest
77+
Body = "Method $($Request.Method) is not supported."
78+
})
7979
}
8080
'POST' {
8181
# Parse the script data to determine type

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Endpoint/MEM/Invoke-RemoveIntuneScript.ps1

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ function Invoke-RemoveIntuneScript {
3535
'Linux' {
3636
"https://graph.microsoft.com/beta/deviceManagement/ConfigurationPolicies('$($ID)')"
3737
}
38-
Default { $null }
38+
default { $null }
3939
}
4040

4141
$null = New-GraphPOSTRequest -uri $URI -type DELETE -tenantid $TenantFilter
4242
$Result = "Deleted $($ScriptType) script $($DisplayName) with ID: $($ID)"
43-
Write-LogMessage -headers $.Headers -API $APINAME -tenant $Tenant -message $Result -Sev 'Info'
43+
Write-LogMessage -headers $Headers -API $APINAME -tenant $Tenant -message $Result -Sev 'Info'
4444
$StatusCode = [HttpStatusCode]::OK
4545
} catch {
4646
$ErrorMessage = Get-CippException -Exception $_
@@ -49,11 +49,10 @@ function Invoke-RemoveIntuneScript {
4949
$StatusCode = [HttpStatusCode]::Forbidden
5050
}
5151

52-
$body = [pscustomobject]@{'Results' = "$Result" }
5352
# Associate values to output bindings by calling 'Push-OutputBinding'.
5453
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
5554
StatusCode = $StatusCode
56-
Body = $body
55+
Body = @{'Results' = "$Result" }
5756
})
5857

5958
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ function Invoke-ListUserMailboxDetails {
288288
LitigationHoldEnabled,
289289
LitigationHoldDate,
290290
LitigationHoldDuration,
291-
@{ Name = 'LicensedForLitigationHold'; Expression = { ($_.PersistedCapabilities -contains 'BPOS_S_DlpAddOn' -or $_.PersistedCapabilities -contains 'BPOS_S_Enterprise') } },
291+
@{ Name = 'LicensedForLitigationHold'; Expression = { ($_.PersistedCapabilities -contains 'EXCHANGE_S_ARCHIVE_ADDON' -or $_.PersistedCapabilities -contains 'EXCHANGE_S_ENTERPRISE') } },
292292
ComplianceTagHoldApplied,
293293
RetentionHoldEnabled,
294294
InPlaceHolds)

Modules/CIPPCore/Public/GraphHelper/New-GraphPOSTRequest.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ function New-GraphPOSTRequest ($uri, $tenantid, $body, $type, $scope, $AsApp, $N
1111
$headers.Add($header.Key, $header.Value)
1212
}
1313
}
14-
Write-Verbose "Using $($uri) as url"
14+
1515
if (!$type) {
1616
$type = 'POST'
1717
}
1818

19+
Write-Information "$($type.ToUpper()) [ $uri ] | tenant: $tenantid"
20+
1921
if (!$contentType) {
2022
$contentType = 'application/json; charset=utf-8'
2123
}
@@ -28,6 +30,7 @@ function New-GraphPOSTRequest ($uri, $tenantid, $body, $type, $scope, $AsApp, $N
2830
} else {
2931
$_.Exception.message
3032
}
33+
3134
throw $Message
3235
}
3336
if ($returnHeaders) {

Modules/CIPPCore/Public/SAMManifest.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@
9191
"id": "9255e99d-faf5-445e-bbf7-cb71482737c4",
9292
"type": "Role"
9393
},
94+
{
95+
"id": "8b9d79d0-ad75-4566-8619-f7500ecfcebe",
96+
"type": "Scope"
97+
},
9498
{
9599
"id": "06a5fe6d-c49d-46a7-b082-56b1b14103c7",
96100
"type": "Role"

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardEnableLitigationHold.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ function Invoke-CIPPStandardEnableLitigationHold {
3939

4040
try {
4141
$MailboxesNoLitHold = New-ExoRequest -tenantid $Tenant -cmdlet 'Get-Mailbox' -cmdParams @{ Filter = 'LitigationHoldEnabled -eq "False"' } -Select 'UserPrincipalName,PersistedCapabilities,LitigationHoldEnabled' |
42-
Where-Object { $_.PersistedCapabilities -contains 'BPOS_S_DlpAddOn' -or $_.PersistedCapabilities -contains 'BPOS_S_Enterprise' }
43-
}
44-
catch {
42+
Where-Object { $_.PersistedCapabilities -contains 'EXCHANGE_S_ARCHIVE_ADDON' -or $_.PersistedCapabilities -contains 'EXCHANGE_S_ENTERPRISE' }
43+
} catch {
4544
$ErrorMessage = Get-NormalizedError -Message $_.Exception.Message
4645
Write-LogMessage -API 'Standards' -Tenant $Tenant -Message "Could not get the EnableLitigationHold state for $Tenant. Error: $ErrorMessage" -Sev Error
4746
return

0 commit comments

Comments
 (0)