GraphClient SDK always returns null MailboxSettings
Hi,
I am having an issue getting timezone value from MailBoxSettings with Graph SDK. I am able to get timezone when using the REST api here, https://graph.microsoft.com/v1.0/me/mailboxSettings/timeZone
However GraphClient SDK(Microsoft.Graph Nuget Package) does not load MailBoxSettings and it is always null. I was testing the graph console app, https://github.com/microsoftgraph/console-csharp-connect-sample
var graphClient = AuthenticationHelper.GetAuthenticatedClient();
var me = graphClient.Me.Request().GetAsync().Result;
var timeZone = me.MailboxSettings.TimeZone;
Appreciate your help.
MailboxSettings is a property of the User object that is not returned by default. In order to retrieve it you have to explicitly select it. There is a StackOverflow question that shows how here You will also need the permission MailboxSettings.Read
That worked! Thanks for the reference.