Enum members should always be referenced by their string value, that's a best practice. That said, "hiddenMembership" can only be set when creating a new Team/Group, so this is the likely reason why your request fails.
Error when try to patch team Rest Api
Hello, I'm trying to alter a team using the API endpoint v1.0/teams/. Recently, I encountered an error using this API that was not happening before.
The response I'm getting is a bad request. While searching for the problem, I came across the field called "visibility":
https://learn.microsoft.com/en-us/graph/api/team-update?view=graph-rest-1.0&tabs=http
https://learn.microsoft.com/pt-br/graph/api/resources/teamvisibilitytype?view=graph-rest-1.0
This link provides options for the "visibility" field. When I use 0 or 1 as the value, I get a bad request error, but it works fine when I use 2 as the value.
Sample JSON Code:
The code above works fine, but if I change the "visibility" to any other value, the error occurs. It used to work fine before, but I'm not sure if something has changed recently. Is anyone else experiencing something like this?
Thanks
Microsoft Teams | Development
Microsoft Security | Microsoft Graph
Microsoft Teams | Microsoft Teams for business | Other
-
Vasil Michev 123.7K Reputation points MVP Volunteer Moderator2023-08-04T15:58:51.0966667+00:00