Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 1.01 KB

File metadata and controls

32 lines (24 loc) · 1.01 KB
description Automatically generated file. DO NOT MODIFY
// Code snippets are only available for the latest major version. Current major version is $v0.*

// Dependencies
import (
	  "context"
	  msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
	  graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
	  //other-imports
)

requestBody := graphmodels.NewChannel()
displayName := "Project Collaboration"
requestBody.SetDisplayName(&displayName) 
description := "Discussion space for project team collaboration"
requestBody.SetDescription(&description) 
membershipType := graphmodels.STANDARD_CHANNELMEMBERSHIPTYPE 
requestBody.SetMembershipType(&membershipType) 
layoutType := graphmodels.CHAT_CHANNELLAYOUTTYPE 
requestBody.SetLayoutType(&layoutType) 

// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
channels, err := graphClient.Teams().ByTeamId("team-id").Channels().Post(context.Background(), requestBody, nil)