Skip to content

Commit

Permalink
Merge pull request #1223 from KelvinTegelaar/dev
Browse files Browse the repository at this point in the history
Dev to hotfix
  • Loading branch information
KelvinTegelaar authored Jan 14, 2025
2 parents 99c417b + 12082a7 commit 17f65df
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Function Invoke-ExecQuarantineManagement {
param($Request, $TriggerMetadata)

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


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

# Interact with query parameters or the body of the request.
Try {
$tenantfilter = $Request.Query.TenantFilter
$TenantFilter = $Request.Body.tenantFilter
$params = @{
Identity = $request.query.ID
AllowSender = [boolean]$Request.query.AllowSender
ReleasetoAll = [boolean]$Request.query.type
ActionType = $Request.query.type
Identity = $Request.Body.Identity
AllowSender = [boolean]$Request.Body.AllowSender
ReleaseToAll = [boolean]$Request.Body.Type
ActionType = $Request.Body.Type
}
Write-Host $params

New-ExoRequest -tenantid $TenantFilter -cmdlet 'Release-QuarantineMessage' -cmdParams $Params
$Results = [pscustomobject]@{'Results' = "Successfully processed $($request.query.ID)" }
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -tenant $($tenantfilter) -message "$($request.query.id)" -Sev 'Info'
$Results = [pscustomobject]@{'Results' = "Successfully processed $($Request.Body.Identity)" }
Write-LogMessage -user $Request.headers.'x-ms-client-principal' -API $APINAME -tenant $TenantFilter -message "Successfully processed Quarantine ID $($Request.Body.Identity)" -Sev 'Info'
} catch {
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -tenant $($tenantfilter) -message "Quarantine Management failed: $($_.Exception.Message)" -Sev 'Error'
Write-LogMessage -user $Request.headers.'x-ms-client-principal' -API $APINAME -tenant $TenantFilter -message "Quarantine Management failed: $($_.Exception.Message)" -Sev 'Error' -LogData $_
$Results = [pscustomobject]@{'Results' = "Failed. $($_.Exception.Message)" }
}
# Associate values to output bindings by calling 'Push-OutputBinding'.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ Function Invoke-ExecAutoExtendGDAP {
[CmdletBinding()]
param($Request, $TriggerMetadata)

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

# Interact with query parameters or the body of the request.
$Results = Set-CIPPGDAPAutoExtend -RelationShipid $Request.query.ID
$Id = $Request.query.ID ?? $Request.Body.ID
$Results = Set-CIPPGDAPAutoExtend -RelationShipid $Id

# Associate values to output bindings by calling 'Push-OutputBinding'.
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ Function Invoke-ExecGDAPRemoveGArole {
[CmdletBinding()]
param($Request, $TriggerMetadata)

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

$GDAPID = $request.query.GDAPId
$GDAPID = $request.query.GDAPId ?? $request.Body.GDAPId

try {
$CheckActive = New-GraphGetRequest -NoAuthCheck $True -uri "https://graph.microsoft.com/beta/tenantRelationships/delegatedAdminRelationships/$($GDAPID)" -tenantid $env:TenantID
Expand All @@ -36,7 +33,7 @@ Function Invoke-ExecGDAPRemoveGArole {
$Message = "Relationship status is currently $($CheckActive.status), it is not possible to remove the Global Administrator role in this state."
}
if ('62e90394-69f5-4237-9190-012177145e10' -notin $CheckActive.accessDetails.unifiedRoles.roleDefinitionId) {
$Message = "This relationship does not contain the Global Administrator role."
$Message = 'This relationship does not contain the Global Administrator role.'
}
}
} catch {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function New-GraphGetRequest {
[string]$scope,
[bool]$AsApp,
[bool]$noPagination,
[bool]$NoAuthCheck,
$NoAuthCheck = $false,
[bool]$skipTokenCache,
$Caller,
[switch]$ComplexFilter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1748,7 +1748,7 @@ function Invoke-NinjaOneTenantSync {
},
@{
Name = 'Compliance Portal'
Link = "https://compliance.microsoft.com/?tid=$($Customer.CustomerId)"
Link = "https://purview.microsoft.com/?tid=$($Customer.CustomerId)"
Icon = 'fas fa-user-shield'
},
@{
Expand Down
2 changes: 1 addition & 1 deletion version_latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.2
7.0.3

0 comments on commit 17f65df

Please sign in to comment.