简体   繁体   中英

Using Microsoft graph api to get outlook calendar events

Sorry if this question sounds a bit broad but the question describes what I am trying to do.

In my organisation I am trying to get events from certain people's calendar and then add those events into one shared calendar, Like creating a team shared calendar displaying what everyone's time availability.

Though as a starting point, I want to be able to retrieve the events from their calendars and displaying them on a table. Can anyone point me to a tutorial on how to do that in an asp.net app ?

We don't currently have a sample that handles this scenario specifically, but we do have a number of ASP.NET samples that could help you get started with Microsoft Graph + ASP.NET: https://github.com/microsoftgraph?utf8=%E2%9C%93&q=asp

This page shows you how to get events for a specific user by using raw REST calls to the Microsoft Graph endpoint: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_list_events

Were you planning on using the Microsoft Graph .NET SDK instead of raw REST calls? I can provide a code snippet for that if you're interested.

You need to make sure that you, or an Azure Admin, “Grant Permission” to the various requested Graph permissions. Some of them require explicit Admin consent. From there you can use the Users[{username}].Events.Request().GetAsync() to retrieve events. Be sure to supply the required start & end datetime parameters.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM