Skip to content

Commit f1c885c

Browse files
authored
Merge pull request #64 from KelvinTegelaar/master
[pull] master from KelvinTegelaar:master
2 parents 54b9fcd + 17f65df commit f1c885c

File tree

6 files changed

+17
-23
lines changed

6 files changed

+17
-23
lines changed

Diff for: Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Email-Exchange/Invoke-ExecQuarantineManagement.ps1

+10-10
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Function Invoke-ExecQuarantineManagement {
1111
param($Request, $TriggerMetadata)
1212

1313
$APIName = $TriggerMetadata.FunctionName
14-
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -message 'Accessed this API' -Sev 'Debug'
14+
Write-LogMessage -user $Request.headers.'x-ms-client-principal' -API $APINAME -message 'Accessed this API' -Sev 'Debug'
1515

1616

1717
# Write to the Azure Functions log stream.
@@ -20,19 +20,19 @@ Function Invoke-ExecQuarantineManagement {
2020

2121
# Interact with query parameters or the body of the request.
2222
Try {
23-
$tenantfilter = $Request.Query.TenantFilter
23+
$TenantFilter = $Request.Body.tenantFilter
2424
$params = @{
25-
Identity = $request.query.ID
26-
AllowSender = [boolean]$Request.query.AllowSender
27-
ReleasetoAll = [boolean]$Request.query.type
28-
ActionType = $Request.query.type
25+
Identity = $Request.Body.Identity
26+
AllowSender = [boolean]$Request.Body.AllowSender
27+
ReleaseToAll = [boolean]$Request.Body.Type
28+
ActionType = $Request.Body.Type
2929
}
30-
Write-Host $params
30+
3131
New-ExoRequest -tenantid $TenantFilter -cmdlet 'Release-QuarantineMessage' -cmdParams $Params
32-
$Results = [pscustomobject]@{'Results' = "Successfully processed $($request.query.ID)" }
33-
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -tenant $($tenantfilter) -message "$($request.query.id)" -Sev 'Info'
32+
$Results = [pscustomobject]@{'Results' = "Successfully processed $($Request.Body.Identity)" }
33+
Write-LogMessage -user $Request.headers.'x-ms-client-principal' -API $APINAME -tenant $TenantFilter -message "Successfully processed Quarantine ID $($Request.Body.Identity)" -Sev 'Info'
3434
} catch {
35-
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -tenant $($tenantfilter) -message "Quarantine Management failed: $($_.Exception.Message)" -Sev 'Error'
35+
Write-LogMessage -user $Request.headers.'x-ms-client-principal' -API $APINAME -tenant $TenantFilter -message "Quarantine Management failed: $($_.Exception.Message)" -Sev 'Error' -LogData $_
3636
$Results = [pscustomobject]@{'Results' = "Failed. $($_.Exception.Message)" }
3737
}
3838
# Associate values to output bindings by calling 'Push-OutputBinding'.

Diff for: Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/GDAP/Invoke-ExecAutoExtendGDAP.ps1

+2-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@ Function Invoke-ExecAutoExtendGDAP {
1010
[CmdletBinding()]
1111
param($Request, $TriggerMetadata)
1212

13-
$APIName = $TriggerMetadata.FunctionName
14-
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -message 'Accessed this API' -Sev 'Debug'
15-
16-
# Interact with query parameters or the body of the request.
17-
$Results = Set-CIPPGDAPAutoExtend -RelationShipid $Request.query.ID
13+
$Id = $Request.query.ID ?? $Request.Body.ID
14+
$Results = Set-CIPPGDAPAutoExtend -RelationShipid $Id
1815

1916
# Associate values to output bindings by calling 'Push-OutputBinding'.
2017
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{

Diff for: Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/GDAP/Invoke-ExecGDAPRemoveGArole.ps1

+2-5
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ Function Invoke-ExecGDAPRemoveGArole {
99
[CmdletBinding()]
1010
param($Request, $TriggerMetadata)
1111

12-
$APIName = $TriggerMetadata.FunctionName
13-
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -message 'Accessed this API' -Sev 'Debug'
14-
15-
$GDAPID = $request.query.GDAPId
12+
$GDAPID = $request.query.GDAPId ?? $request.Body.GDAPId
1613

1714
try {
1815
$CheckActive = New-GraphGetRequest -NoAuthCheck $True -uri "https://graph.microsoft.com/beta/tenantRelationships/delegatedAdminRelationships/$($GDAPID)" -tenantid $env:TenantID
@@ -36,7 +33,7 @@ Function Invoke-ExecGDAPRemoveGArole {
3633
$Message = "Relationship status is currently $($CheckActive.status), it is not possible to remove the Global Administrator role in this state."
3734
}
3835
if ('62e90394-69f5-4237-9190-012177145e10' -notin $CheckActive.accessDetails.unifiedRoles.roleDefinitionId) {
39-
$Message = "This relationship does not contain the Global Administrator role."
36+
$Message = 'This relationship does not contain the Global Administrator role.'
4037
}
4138
}
4239
} catch {

Diff for: Modules/CIPPCore/Public/GraphHelper/New-GraphGetRequest.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function New-GraphGetRequest {
1010
[string]$scope,
1111
[bool]$AsApp,
1212
[bool]$noPagination,
13-
[bool]$NoAuthCheck,
13+
$NoAuthCheck = $false,
1414
[bool]$skipTokenCache,
1515
$Caller,
1616
[switch]$ComplexFilter,

Diff for: Modules/CippExtensions/Public/NinjaOne/Invoke-NinjaOneTenantSync.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1748,7 +1748,7 @@ function Invoke-NinjaOneTenantSync {
17481748
},
17491749
@{
17501750
Name = 'Compliance Portal'
1751-
Link = "https://compliance.microsoft.com/?tid=$($Customer.CustomerId)"
1751+
Link = "https://purview.microsoft.com/?tid=$($Customer.CustomerId)"
17521752
Icon = 'fas fa-user-shield'
17531753
},
17541754
@{

Diff for: version_latest.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.0.2
1+
7.0.3

0 commit comments

Comments
 (0)