Forum Discussion
Teams calendar to be linked to Teams app
Bowiorx -
Bowiorx -
Microsoft Graph APIs provide a unified programmability model that you can use to access the tremendous amount of data in Microsoft 365. You can use these APIs to pull the calendar data and use it in your app.
Here's a basic example of how you can use the Graph API to get calendar events to get the calendar events of the currently logged in user.
- List calendars - Microsoft Graph v1.0 | Microsoft Learn
- List events - Microsoft Graph v1.0 | Microsoft Learn
You can use this data to check if there's an event at the time of booking a desk and prevent the booking if there is.
Please note that you need to have the appropriate permissions to access the calendar data. You can find more information about this in the Microsoft Graph permissions reference.
Also, remember that this is a basic example and you might need to modify it according to your needs. For more complex scenarios, you might need to use other endpoints and methods provided by the Graph API.
For more information about using Microsoft Graph APIs, you can refer to the Microsoft Graph documentation.