title: Using Microsoft Outlook API with C# to list calendars and add events
body: <p>I have found some Microsoft Resources about how to use the REST API to connect to an Outlook account. The sample tutorial they provided got me to create a WPF project and register an app with the Outlook Developer centre.</p>
  <p>So I have done all of that and can connect to Outlook. It shows the content screen where the user must allow access. All good.</p>
  <p>But I don't want to use WPF. Ideally I want to write a C# .NET DLL component what with communicate with the Outlook API so that I can specifically:</p>
  <ul>
  <li>List Calendars</li>
  <li>Add events to calendar</li>
  <li>Delete events from calendar</li>
  </ul>
  <p>I understand that I need to use the <a href="https://www.nuget.org/packages/Microsoft.Graph" rel="nofollow noreferrer">Microsoft.Graph</a> library but I can't find out how to use this with C# .NET.</p>
  <p>I am familiar with the Google Calendar API and have written a <strong>VB. NET</strong>  command line utility that does the same things. So I was hoping to do things similarly.</p>
  <p>The WPF tutorial stops at the &quot;connect&quot; stage so I am at a loss as to how to proceed. And the other example is here:</p>
  <p><a href="https://docs.microsoft.com/en-us/outlook/rest/dotnet-tutorial" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/outlook/rest/dotnet-tutorial</a></p>
  <p>That shows you how to write a utility with <strong>ASP.NET MVC Web app</strong> to get Outlook mail, calendar, and contacts. But again, I am confused as to how to do what I want with C#.NET DLL.</p>
  <p>If it is possible to using the Microsoft.Graph library from C# DLL to list the calendars etc. I would appreciate guidance.</p>
  <p>If there is a more direct resource I should point this question to then I would be more than happy to do so.</p>
  <p>Thank you.</p>
  <p>PS. Please note that I am referring to the online Outlook system and not the Microsoft Outlook on a user PC.</p>