'Folder.Bind Method in Graph SDK client using C#

We need folder.bind similar method in Graph SDK using C#.

Below method works with Outlook Exchange services but for O365 user its not working.

var msgRootFId = new EWS.FolderId(EWS.WellKnownFolderName.MsgFolderRoot, new EWS.Mailbox(SMTPAddress));
msgRoot = EWS.Folder.Bind(service, msgRootFId, EWS.BasePropertySet.IdOnly);


Solution 1:[1]

You can call one of the following endpoints. Instead of id you can use well-known folder name msgfolderroot

GET /me/mailFolders/{id}
GET /me/mailFolders/msgfolderroot

GET /users/{id | userPrincipalName}/mailFolders/{id}
GET /users/{id | userPrincipalName}/mailFolders/msgfolderroot

Resources:

mailFolder resource type

get mailFolder

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 user2250152