msgraph-sdk-dotnet
msgraph-sdk-dotnet copied to clipboard
Meeting requests are returned as `Message` instead of as `EventMeetingRequestObject`
Describe the bug
I'm trying to get meeting requests from a mail folder, but the returned object is still a Message
instead of an EventMessageRequestObject
, despite the fact that ODataType = #microsoft.graph.eventMessageRequest
. When testing using GraphExplorer, all the correct properties seem to be returned, so it looks to me like this is an issue with the SDK matching the response to the correct type.
Using .Expand("microsoft.graph.eventMessage/event")
it's possible to get the associated event, but this is also not very convenient, as this doesn't play well with the expand expression overload, which only allows direct properties of Message
, and using .Expand
multiple times results in an error, instead of combining the expand expressions. Of course, I could create the expand query string myself without using the expand expression, but I'd rather not, as I find the expand expression syntax much more convenient.
To Reproduce
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
IMailFolderMessagesCollectionPage messagePage = graphClient.Users["user-id"]
.MailFolders["folder-id"]
.Messages
.Request()
.GetAsync();
Expected behavior
The message page contains the meeting request as an EventMeetingRequestObject
, instead of as a Message
.
Additional context
- .NET version:
.NET Framework 4.8
- SDK version:
4.36