microsoftgraph / msgraph-sdk-powershell

Powershell SDK for Microsoft Graph
https://www.powershellgallery.com/packages/Microsoft.Graph
Other
696 stars 168 forks source link

Remove-MgDeviceManagementManagedDeviceUser is not working #863

Closed hstrang closed 2 years ago

hstrang commented 3 years ago

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 )

peombwa commented 3 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.

peombwa commented 2 years ago

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.