-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove-MgTeam: Method Not Allowed and incorrect example #2841
Comments
Yes, I stumbled upon the same problem, it really bothers me as well... |
@Lyx09 thank you for logging this issue and apologies for the experience you are having with that cmdlet. Having used both Further investigations also revealed that the documentation for that particular API is not available here https://learn.microsoft.com/en-us/graph/api/resources/team?view=graph-rest-1.0. Unfortunately, for API related issues/questions we are not best placed to give an answer. Kindly raise an issue here https://developer.microsoft.com/en-us/graph/support so that the API owner can respond to it. You can also consider archiving the team as described here |
Thank you for your reply. I'll do as you said. However, even though the endpoint is broken, the examples are still incorrect (Get-Help). |
I contacted the Microsoft support, and they suggested I use an alternative endpoint to delete a team, which I did not think about: |
@Lyx09 thanks for noticing the examples issue. It will be resolved in the next release. |
Thank you @timayabi2020. As a final comment to close this issue, I'd like to add the Microsoft support response I got that confirms that the DELETE /teams/{team-id} endpoint is not valid: Regards, |
Describe the bug
I'm working on a project where I need to delete unused Teams. I'm trying to use the "Remove-MgTeam" command with the "-TeamId" parameter, but I get the following error:
The team exists, and I have do have permissions to delete the Team:
Trying to reach the endpoint directly, using Invoke-MgGraphRequest instead gives the same result (as expected):
The enpoint is defined when using "Find-MgGraphCommand":
The endpoint does not seem to allow the "DELETE" method, but the "GET" method works:
Moreover, the documentation and Get-Help shows incorrect examples:
Expected behavior
The team should be deleted, no errors should be thrown.
Documentation should include example of Remove-MgTeam instead of Update-MgTeam
How to reproduce
Connect-MgGraph
Remove-MgTeam -TeamId "{teamid}"
SDK Version
Latest version known to work for scenario above?
No response
Known Workarounds
Use MicrosoftTeams module instead with the "Remove-Team" and "-GroupId" parameter
Debug output
Click to expand log
Note: identifying information has been removedConfiguration
$PSVersionTable
Other information
No response
The text was updated successfully, but these errors were encountered: