You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardDisableSelfServiceLicenses.ps1
+57-3Lines changed: 57 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ function Invoke-CIPPStandardDisableSelfServiceLicenses {
17
17
Prevents employees from purchasing Microsoft 365 licenses independently, ensuring all software acquisitions go through proper procurement channels. This maintains budget control, prevents unauthorized spending, and ensures compliance with corporate licensing agreements.
18
18
ADDEDCOMPONENT
19
19
{"type":"textField","name":"standards.DisableSelfServiceLicenses.Exclusions","label":"License Ids to exclude from this standard","required":false}
20
+
{"type":"switch","name":"standards.DisableSelfServiceLicenses.DisableTrials","label":"Disable starting trials on behalf of your organization"}
20
21
IMPACT
21
22
Medium Impact
22
23
ADDEDDATE
@@ -51,7 +52,27 @@ function Invoke-CIPPStandardDisableSelfServiceLicenses {
New-GraphPOSTRequest-scope 'aeb86249-8ea3-49e2-900b-54cc8e308f85/.default'-uri "https://licensing.m365.microsoft.com/v1.0/policies/AllowSelfServicePurchase/products/$($Item.productId)"-tenantid $Tenant-body $body-type PUT
127
+
}
94
128
95
129
Write-LogMessage-API 'Standards'-tenant $tenant-message "Changed Self Service status for product '$($Item.productName) - $($Item.productId)' from '$currentValue' to '$($Item.policyValue)'"-sev Info
96
130
} catch {
@@ -99,7 +133,27 @@ function Invoke-CIPPStandardDisableSelfServiceLicenses {
0 commit comments