Closed hstrang closed 2 years ago
According to the API reference, update via PATCH is not supported on this resource, and we shouldn't generate the command. We will suppress the command in the next releases.
You can use Update-MgDeviceManagementWindowAutopilotDeviceIdentityDeviceProperty
to update properties of an autopilot device. The commands calls this endpoint -> https://docs.microsoft.com/en-us/graph/api/intune-enrollment-windowsautopilotdeviceidentity-updatedeviceproperties?view=graph-rest-1.0.
Find-MgGraphCommand -Uri "/deviceManagement/windowsAutopilotDeviceIdentities/{windowsAutopilotDeviceIdentityId}/updateDeviceProperties"
Attempts to update autopilot device parameters with Update-MgDeviceManagementWindowAutopilotDeviceIdentity end up with the error message below. The message refers to http verb PATCH while according to the related Graph API documentation it should be a POST request instead. (POST /deviceManagement/windowsAutopilotDeviceIdentities/{windowsAutopilotDeviceIdentityId}/updateDeviceProperties)
This can be verified with Graph Explorer where POST does what is expected and PATCH gives the same error message.
_Update-MgDeviceManagementWindowAutopilotDeviceIdentity : No OData route exists that match template ~/singleton/navigation/key with http verb PATCH for request /DeviceEnrollmentFE2109/StatelessDeviceEnrollmentFEService /deviceManagement/windowsAutopilotDeviceIdentities('deviceid').