Skip to content

Commit

Permalink
Subscription changes
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Dec 23, 2024
1 parent 393968b commit 63009e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Modules/CIPPCore/Public/Entrypoints/Invoke-ExecCSPLicense.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ Function Invoke-ExecCSPLicense {
if ($Action -eq 'NewSub') {
$GraphRequest = Set-SherwebSubscription -tenantFilter $TenantFilter -SKU $Request.body.sku -Quantity $Request.body.Quantity
}
if ($Action -eq 'Cancel') {
$GraphRequest = Remove-SherwebSubscription -tenantFilter $TenantFilter -SubscriptionIds $Request.body.SubscriptionIds
}
$Message = 'License change executed successfully.'
} catch {
$Message = "Failed to execute license change. Error: $_"
Expand Down

0 comments on commit 63009e6

Please sign in to comment.