4
votes

I am trying to create channels in Microsoft Teams using the Microsoft Graph Beta API. In the docs, it says that the channel entity has a property IsFavoriteByDefault that indicates

Whether the channel should automatically be marked 'favorite' for all members of the team. Default: false.

https://docs.microsoft.com/en-us/graph/api/resources/channel?view=graph-rest-beta#properties

However, trying the Graph Beta API (either with custom call or the Graph Explorer) and whatever value I pass to this property true or false, this property remains null.

exhibit from Graph Explorer

Is there anything special to do to actually set the value of this property ?

2
No answer so far... hang on! github.com/microsoftgraph/microsoft-graph-docs/issues/4241 Hope MS will solve this bug soon.Guillaume Meyer
I am calling beta graph api from the HTTP connector in a power automate flow to create team and channels and using "isFavouriteByDefault": true doesn't seem to unhide channels (in browser or native client), they are all hidden by default.user1063287

2 Answers

1
votes

Has anyone found a resolution to this? I added the isFavoritebyDefault but I am seeing this only adds this for the owner or user who runs the flow not for all members of the team. Code is provided below for reference.

{
  "requests": [
    {
      "url": "/teams/{varTeamID}/channels",
      "method": "POST",
      "id": 1,
      "headers": {
        "Content-Type": "application/json"
      },
      "body": {
        "displayName": "{varChannelName}",
        "description": "This channel is in existence for",
        "isFavoriteByDefault": true
      }
    }
  ]
}
0
votes

Now the doc shows as ,

Indicates whether the channel should automatically be marked 'favorite' for all members of the team. Can only be set programmatically with Create team. Default: false.

That means setting IsFavoriteByDefault to true won't work on create channel api call.
But it will work as part of the create Team API where channel(s) can be added and set as IsFavoriteByDefault as true