问题
I think there might be a bug in the following API endpoint to get calendar events for different meeting rooms: https://graph.microsoft.com/beta/me/calendar/getSchedule. I know it is still beta and I see some inconsistency in returned data for meetings:
Testing scenario when the returned data changes: Logged in user: Bogdan C.
- Add a meeting
- Query the API and see
meeting titleassubject - Add another meeting
- Run again the query and see
usernameassubjectfor the first meeting.
As a test scenario: request body:
{
schedules: ['room1'],
//..other params
}
As a part of the response:
{
"scheduleId": "room1",
"scheduleItems": [
{
// first meeting added
...
"subject": "**Bogdan C.**", // bad
"location": "Room 1",
},
{
...
"subject": "**Design meeting**", // good
"location": "Room 1",
}
]
}
Any idea about what might be wrong?
Thanks
回答1:
The issue here was related to the AddOrganizerToSubject and DeleteSubject calendar processing variables in Outlook, which both default to true.
We fixed them with the following PowerShell commands:
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Get-Mailbox -RecipientTypeDetails RoomMailbox | Set-CalendarProcessing -AddOrganizerToSubject $false -DeleteSubject $false
Now the meeting subjects appear as expected.
来源:https://stackoverflow.com/questions/52761445/microsoft-graph-beta-getschedule-api-inconsistency-subject