Reputation: 1496
I am having problems setting the IsRead property when reading email, and after lots of Googling the following appears to be the code required.
await Client.Me.Messages[m.Id].Request().Select("IsRead").UpdateAsync(new Message() { IsRead = true });
The problem is this is returning:
Mail Exception: Code: ErrorAccessDenied
Message: Access is denied. Check credentials and try again
ClientRequestId: (the id here)
The Microsoft Graph Docs says the permissions required are Mail.ReadWrite. I have confirmed we have that.
Other problems on Stackoverflow include Fails to mark as read, but my problem is one of access denied, rather than trying to set read-only properties.
I've also tried the code from here: Github Graph Issue but again, I'm getting Access Denied.
The app has the following permissions: Mail.Read
Mail.ReadBasic
Mail.ReadBasicAll
Mail.ReadWrite
Mail.Send
MailboxSettings.Read
MailboxSetings.ReadWrite
User.Read
User.ReadAll
Is there anything else required?
Upvotes: 2
Views: 826
Reputation: 2464
Upvotes: 2