0

Just to start off, anything in the {} is just a variable passed in a foreach loop - but for simplicity's sake...

I am currently calling the Microsoft Graph API to call our meeting room calendar, and list the next 3 events:

https://graph.microsoft.com/v1.0/users/{id}/calendar/calendarView?StartDateTime=YYYY-MM-DDT08:00:00.0000000Z&EndDateTime=YYYY-MM-DDT18:00:00.0000000Z&select=start,end,organizer,subject

Which will return the correct details for that room, and its events:

Array (
    [@odata.etag] => W/"1QAcmk6aukS..."
    [id] => AAMkADRkM2I5MTk5LTZmO...

    [subject] => {Organiser's First Last} 

    [start] => Array (
        [dateTime]      => 2019-05-10T09:15:00.0000000
    )

    [end] => Array (
        [dateTime]      => 2019-05-10T09:30:00.0000000
    )

    [organizer] => Array (
        [emailAddress] => Array (
            [name]      => First Last
            [address]   => email@domain.ltd
        )

    )
)

However, as you can see I am getting the subject as the organiser's name rather than the meeting subject. This is a result of the room not being the organiser and their calendar stating they have a meeting with said person.

Is there a way to look up that organiser's subject for that meeting and having it pull the correct subject line?

I have tried using the [id] but they don't seem to match the user <-> room [id].

I have tried running the API call as so:

https://graph.microsoft.com/v1.0/users/{[organizer][email][address]}/calendar/calendarView?StartDateTime={[start][dateTime]}&EndDateTime={[end][dateTime]}&select=subject

Which works only if there are no all day events or overlapping events for that user.

Is there a way to correlate these items?

markb
  • 1,100
  • 1
  • 15
  • 40

1 Answers1

0

I don't know why some moderator deleted a perfectly valid answer, here it is again

https://medium.com/meeting-room-365/issue-display-shows-organizers-name-instead-of-subject-731f4cf414ac

Short version:

Set-CalendarProcessing -Identity RESOURCEMAILBOX -DeleteSubject $False -AddOrganizerToSubject $False

FrontlineA
  • 44
  • 2
  • Thank you for that! I guess that is a solution, albeit not the one I was after. I was hoping to do it through the API without admin. But nothing I've found or tried works - so I guess this is actually the correct most easiest solution – markb Jan 07 '20 at 23:38