How can I Update the MailboxSettings with Microsoft Graph API

后端 未结 1 1013
一生所求
一生所求 2021-01-28 03:08

I want to update the MailboxSettings from different calendar.

How Can I build the Request that I can update the MailboxSetting via Microsoft Graph?

Here is my co

相关标签:
1条回答
  • 2021-01-28 03:23

    This is not currently supported by the SDK. You will need to make explicit http calls to achieve this.

    Following is the code to update the timezone through mailbox settings:

    Uri Uri = new Uri("https://graph.microsoft.com/v1.0/users/"+ user.Id 
              +"/mailboxSettings");
    String jsonContent = "{\"timeZone\" : \""+ timezone +"\"}";
    HttpContent httpContent = new StringContent(jsonContent, System.Text.Encoding.UTF8, "application/json");
    await _httpClient.PatchAsync(Uri, httpContent);
    

    You can use http://restsharp.org/ to make http calls easily.

    0 讨论(0)
提交回复
热议问题