Development snapshot 2026-10-25 (4.0.0-beta1 + fixes)

This commit is contained in:
Mikael Karlsson
2026-10-25 20:04:55 +11:00
parent 7869619510
commit 325e3a6b12
88 changed files with 21308 additions and 1081 deletions
+17 -6
View File
@@ -287,13 +287,19 @@ class IntunePolicyTypeBase
}
}
# ToDo: Add PageSize Setting
# "All" is the one non-numeric list value and means no $top
# (Test-GraphPageSizeAll). It used to fall through the cast into 20 (#384).
$pageSizeStr = Get-SettingValue "GraphPageSize" $this._TopItems
try {
$pageSize = [uint32]$pageSizeStr
if(Test-GraphPageSizeAll) {
$pageSize = 0
}
catch {
$pageSize = 20
else {
try {
$pageSize = [uint32]$pageSizeStr
}
catch {
$pageSize = 20
}
}
if($this.HasPageSizeSupport -eq $false)
@@ -1121,6 +1127,7 @@ class IntunePolicyBase
$clonedObject = $this.Clone()
Remove-GraphPropertiesForImport $clonedObject $clonedObject.JsonObject
Remove-GraphAssignmentsFromBody $clonedObject.JsonObject
$params = @{}
$strAPI = (?? $clonedObject.PolicyType.APIPOST $clonedObject.PolicyType.API)
@@ -1266,6 +1273,7 @@ class IntunePolicyBase
}
Remove-GraphPropertiesForImport $updateObject $updateObject.JsonObject
Remove-GraphAssignmentsFromBody $updateObject.JsonObject
# isAssigned is a computed status flag many endpoints refuse to accept
# back on PATCH - the original project stripped it on every update.
Remove-Property $updateObject.JsonObject "isAssigned"
@@ -1359,7 +1367,10 @@ class IntunePolicyBase
if($null -eq $sourceObj) { $sourceObj = $this }
$newObj.PolicyType.PostImportCommand($newObj, $sourceObj)
Import-GraphObjectAssignment $newObj $this
# Assignments come from the ORIGINAL too: the create body (this clone)
# has them stripped (Remove-GraphAssignmentsFromBody, #441). UpdateObject
# already passes the original.
Import-GraphObjectAssignment $newObj $sourceObj
}
return $newObj
}
+4 -1
View File
@@ -134,7 +134,10 @@ class FiltersType : IntunePolicyTypeBase
$this._ImportOrder = 15
$this._ExpandAssignmentsList = $false
$this._SupportsAssignments = $false
$this._PropertiesToRemoveForUpdate = @('platform')
# platform cannot be changed; evaluationMode (Graph beta, Oct 2026) is
# accepted on create but any PATCH carrying it fails with a generic 400
# (measured live 2026-10-17).
$this._PropertiesToRemoveForUpdate = @('platform', 'evaluationMode')
$this._PropertiesToRemove = @("payloads")
$this._ScopeTagProperty = "roleScopeTags"
$this._ObjectClass = "FilterObject"
+5 -4
View File
@@ -128,10 +128,11 @@ class FeatureUpdateType : IntunePolicyTypeBase
}
}
[Hashtable]PreImportAssignmentsCommand([PSCustomObject]$PolicyObject, [PSCustomObject]$SourceObject)
{
return (@{ "API" = "$($this.API)/$($PolicyObject.Id)/microsoft.graph.managedDeviceMobileAppConfiguration/assign" })
}
# No PreImportAssignmentsCommand: the default {id}/assign is the right action.
# It used to post to {id}/microsoft.graph.managedDeviceMobileAppConfiguration/assign,
# a cast copied from app configuration that Graph rejects with 400, so
# imported feature update profiles never got their assignments (measured
# live 2026-10-17).
}
Class FeatureUpdateObject : IntunePolicyBase