msgraph-sdk-powershell
msgraph-sdk-powershell copied to clipboard
'Remove-MgUserPhoto' Not Recognized in Microsoft.Graph.Users Module Version 2.13.0 and Grater
Thanks for reporting the bug. Please ensure you've gone through the following checklist before opening an issue:
- Make sure you can reproduce this issue using the latest released version of Microsoft.Graph or Microsoft.Graph.Beta.
- Please search the existing issues to see if there has been a similar issue filed.
- For issues related to authentication and service errors, please refer to our troubleshooting guide. For service issues, please open a question at https://developer.microsoft.com/graph/support.
Describe the bug After updating to version 2.13.0 of the Microsoft.Graph.Users module, the Remove-MgUserPhoto command is no longer recognized. The Get-Command cmdlet returns null when attempting to find the command within the module.
PS C:\Users\username> Get-Command -Module Microsoft.Graph.Users | ?{$_.Name -eq 'Remove-MgUserPhoto'}
To Reproduce Steps to reproduce the behavior:
- Install Microsoft.Graph.Users V2.13.0 or grater.
- Execute Remove-MgUserPhoto.
Debug Output No debug output.
Module Version Microsoft.Graph.Users: 2.12.0
Environment Data Name Value
PSVersion 5.1.22621.2506 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.22621.2506 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
Additional context
Upon checking the OpenApiDocs, it appears that the DELETE method for users/
Also, we have confirmed that Remove-MgDirectoryDeletedItem command is also missing.
Workaround The current workaround is to either downgrade the module to version 2.12.0 or use the 'Invoke-MgGraphRequest' command instead.
Issue logged and tracked in the metadata repo https://github.com/microsoftgraph/msgraph-metadata/issues/576