Skip to content

Commit

Permalink
Edits
Browse files Browse the repository at this point in the history
Edits
  • Loading branch information
BNWEIN committed Jun 27, 2024
1 parent 46671ff commit 5cd9612
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ Function Invoke-ExecEmailForward {
try {
Set-CIPPForwarding -userid $username -tenantFilter $TenantFilter -APIName $APINAME -ExecutingUser $request.headers.'x-ms-client-principal' -Forward $ForwardingAddress -keepCopy $KeepCopy
if (-not $request.body.KeepCopy) {
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -message "Set Forwarding for $($username) to $($ForwardingAddress) and not keeping a copy" -Sev 'Info' -tenant $TenantFilter
$results = "Forwarding all email for $($username) to $($ForwardingAddress) and not keeping a copy"
} elseif ($request.body.KeepCopy) {
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -message "Set Forwarding for $($username) to $($ForwardingAddress) and keeping a copy" -Sev 'Info' -tenant $TenantFilter
$results = "Forwarding all email for $($username) to $($ForwardingAddress) and keeping a copy"
}
} catch {
Expand All @@ -39,10 +37,8 @@ Function Invoke-ExecEmailForward {
try {
Set-CIPPForwarding -userid $username -tenantFilter $TenantFilter -APIName $APINAME -ExecutingUser $request.headers.'x-ms-client-principal' -forwardingSMTPAddress $ForwardingSMTPAddress -keepCopy $KeepCopy
if (-not $request.body.KeepCopy) {
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -message "Set forwarding for $($username) to $($ForwardingSMTPAddress) and not keeping a copy" -Sev 'Info' -tenant $TenantFilter
$results = "Forwarding all email for $($username) to $($ForwardingSMTPAddress) and not keeping a copy"
} elseif ($request.body.KeepCopy) {
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -message "Set forwarding for $($username) to $($ForwardingSMTPAddress) and keeping a copy" -Sev 'Info' -tenant $TenantFilter
$results = "Forwarding all email for $($username) to $($ForwardingSMTPAddress) and keeping a copy"
}
} catch {
Expand All @@ -56,7 +52,6 @@ Function Invoke-ExecEmailForward {
elseif ($DisableForwarding -eq 'True') {
try {
Set-CIPPForwarding -userid $username -username $username -tenantFilter $Tenantfilter -ExecutingUser $ExecutingUser -APIName $APIName -Disable $true
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -message "Disabled Email forwarding for $($username)" -Sev 'Info' -tenant $TenantFilter
$results = "Disabled Email Forwarding for $($username)"
} catch {
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -message "Could not disable Email forwarding for $($username)" -Sev 'Error' -tenant $TenantFilter
Expand Down
40 changes: 0 additions & 40 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4405,46 +4405,6 @@
}
}
},
"/ExecDisableEmailForward": {
"post": {
"description": "ExecDisableEmailForward",
"summary": "ExecDisableEmailForward",
"tags": [
"POST"
],
"parameters": [
{
"required": true,
"schema": {
"type": "string"
},
"name": "tenantfilter",
"in": "body"
},
{
"required": true,
"schema": {
"type": "string"
},
"name": "user",
"in": "body"
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {},
"type": "object"
}
}
},
"description": "Successful operation"
}
}
}
},
"/ExecEditCalendarPermissions": {
"get": {
"description": "ExecEditCalendarPermissions",
Expand Down

0 comments on commit 5cd9612

Please sign in to comment.