Hello There,
I am trying to get events info of Teams Rooms by Room ID from Calendar getSchedule API using service principal or App access token.
In my Application i need information of events like subject, location, start time and end time at particular date.
so i called api POST https://graph.microsoft.com/v1.0/users/{user_id/UserPrincipalName}/calendar/getSchedule Where UserPrincipalName is "******@test.com"
Then pass request payload.
{
"schedules": ["******@test.com", "******@test.com"],
"startTime": {
"dateTime": "2023-06-27T00:00:00",
"timeZone": "India Standard Time"
},
"endTime": {
"dateTime": "2023-06-27T23:59:59",
"timeZone": "India Standard Time"
},
"availabilityViewInterval": 30
}
I received response.
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.scheduleInformation)",
"value": [
{
"scheduleId": "******@test.com",
"availabilityView": "000000000000000000000000000000000000000000000000",
"scheduleItems": [],
"workingHours": {
"daysOfWeek": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"startTime": "08:00:00.0000000",
"endTime": "17:00:00.0000000",
"timeZone": {
"name": "Pacific Standard Time"
}
}
},
{
"scheduleId": "******@test.com",
"availabilityView": "000000000000000000000000000202002020002000000000",
"scheduleItems": [
{
"status": "busy",
"start": {
"dateTime": "2023-06-27T13:30:00.0000000",
"timeZone": "India Standard Time"
},
"end": {
"dateTime": "2023-06-27T14:00:00.0000000",
"timeZone": "India Standard Time"
}
},
{
"status": "busy",
"start": {
"dateTime": "2023-06-27T14:30:00.0000000",
"timeZone": "India Standard Time"
},
"end": {
"dateTime": "2023-06-27T15:00:00.0000000",
"timeZone": "India Standard Time"
}
}
],
"workingHours": {
"daysOfWeek": [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday"
],
"startTime": "08:00:00.0000000",
"endTime": "17:00:00.0000000",
"timeZone": {
"name": "Pacific Standard Time"
}
}
}
]
}
But my problems are
- I am not able to get response of events info like Subject, location except start time, end time and status from given payload "schedules": ["@test.com", "@test.com"].

Thanks you so much