Skip to content

Latest commit

 

History

History
47 lines (36 loc) · 1.49 KB

File metadata and controls

47 lines (36 loc) · 1.49 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"
	  graphcommunications "github.com/microsoftgraph/msgraph-beta-sdk-go/communications"
	  graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
	  //other-imports
)

requestBody := graphcommunications.NewInvitePostRequestBody()


invitationParticipantInfo := graphmodels.NewInvitationParticipantInfo()
identity := graphmodels.NewIdentitySet()
user := graphmodels.NewIdentity()
id := "278405a3-f568-4b3e-b684-009193463064"
user.SetId(&id) 
additionalData := map[string]interface{}{
	"identityProvider" : "AAD", 
}
user.SetAdditionalData(additionalData)
identity.SetUser(user)
invitationParticipantInfo.SetIdentity(identity)
participantId := "a7ebfb2d-871e-419c-87af-27290b22e8db"
invitationParticipantInfo.SetParticipantId(&participantId) 

participants := []graphmodels.InvitationParticipantInfoable {
	invitationParticipantInfo,
}
requestBody.SetParticipants(participants)
clientContext := "f2fa86af-3c51-4bc2-8fc0-475452d9764f"
requestBody.SetClientContext(&clientContext) 

// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
invite, err := graphClient.Communications().Calls().ByCallId("call-id").Participants().Invite().Post(context.Background(), requestBody, nil)