Forum Discussion

marcog5's avatar
marcog5
Copper Contributor
Dec 24, 2020

Create Event linked to Team Channel

I'm trying to create an event into a calendar that mocks an event created directly on Microsoft Teams. So basically when you create an event via Microsoft Teams you can specify the group & the channel that must be part of the event.
I'm using the proper endpoint: https://docs.microsoft.com/en-us/graph/api/user-post-events?view=graph-rest-1.0&tabs=http.
This is the info I'm passing as post request :

{
  subject:"Event Subjct",
  isOrganizer: true,
  start: {
    dateTime:"2020-12-29T12:00:00",
    timeZone:"Pacific Standard Time"
  },
  end: {
    dateTime:"2020-12-29T14:00:00",
    timeZone:"Pacific Standard Time"
  },
  isAllDay: false,
  allowNewTimeProposals: true,
  isOnlineMeeting: true,
  attendees: {
    {
      emailAddress: {
        address:"<groupName@emailaddress.ext>", <-- got directly from Azure
        name:"<TeamGroupName>"
      },
      type:"required"
    }
  },
  hideAttendees: false,
  type: "singleInstance",
  transactionId: "<UNIQUE_ID>",
  onlineMeetingProvider: "teamsForBusiness"
}

Note: all values between <..> are placeholder.

 

The event is correctly created but there's no reference on the Team channel group specified in the attendees field. I've search the definition of attendees array and there's nothing specific to note a group+channel in the attendee collection : https://docs.microsoft.com/en-us/graph/api/resources/attendee?view=graph-rest-1.0

Any help?
Thanks

  • Hi marcog5 ,

     

    Thanks for reaching us!

    I have tried with your schema payload to create an event, it works fine for me. It created an event and also can able to see the array of event attendees in calendar.


    Please have a look on below json,
    {
    "subject": "Rama Test Event 1",
    "body": {
    "contentType": "HTML",
    "content": "Does noon work for you?"
    },
    "start": {
    "dateTime": "2020-12-30T14:00:00",
    "timeZone": "Pacific Standard Time"
    },
    "end": {
    "dateTime": "2020-12-31T17:00:00",
    "timeZone": "Pacific Standard Time"
    },
    "location": {
    "displayName": "Harry's Bar"
    },
    "attendees": [
    {
    "emailAddress": {
    "address": "samanthab@contoso.onmicrosoft.com",
    "name": "Samantha Booth"
    },
    "type": "required"
    },
    {
    "emailAddress": {
    "address": "v-raakav@microsoft.com",
    "name": "Rama"
    },
    "type": "required"
    }
    ],
    "allowNewTimeProposals": true,
    "transactionId": "7E163156-7762-4BEB-A1C6-729EA81755A3"
    }

     

    Calendar Event:

     

    Thanks, 

    Rama

    Teams Dev Community Response 

    You can share your Feedback/Escalate 

Resources