Closed hstrang closed 2 years ago
Thanks for surfacing this! I can confirm that the command to delete a user from a managed device is indeed missing. We will work with our partners to have this available soon.
Missing remove-* commands will be fixed by https://github.com/microsoftgraph/microsoft-graph-devx-api/issues/567.
Closing as duplicate of https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/452.
Remove-MgDeviceManagementManagedDeviceUser is not working, according to documentation there are two ways to call this.
With -ManagedDeviceId and -UserId the result is always remove-mgdevicemanagementmanageddeviceuser : Write requests are only supported on contained entities or navigation properties with bindings.
With -InputObject remove-mgdevicemanagementmanageddeviceuser : The pipeline has been stopped. remove-mgdevicemanagementmanageddeviceuser : InputObject has null value for InputObject.ManagedDeviceId
Calling Graph API directly works as expected. ( /devicemanagement/manageddevices('$id')/users/`$ref )