Forum Discussion
Sohaib_Khan
Jun 09, 2020Copper Contributor
Developing custom web part to display Microsoft Teams Presence as well as chart
Hello, I would like to develop a custom web part in SharePoint Online which will provide me the list of Active users on Microsoft Teams based on presence like Available, Away etc. Also, I would l...
Matti Paukkonen
Jun 10, 2020Iron Contributor
Hi Sohaib_Khan ,
For presence information, you can use Microsoft Graph's Presence API and use getPresencesByUserId endpoint. https://docs.microsoft.com/en-us/graph/api/cloudcommunications-getpresencesbyuserid?view=graph-rest-beta&tabs=http
I have created an example web part displaying presence of team members, which utilizes that endpoint.
https://github.com/mpaukkon/SharePoint/tree/master/spfx-webparts/react-team-presence
For displaying free calendar slots, you can use getSchedule Graph API endpoint: https://docs.microsoft.com/en-us/graph/api/calendar-getschedule?view=graph-rest-1.0&tabs=http
- PowerschmiedeMar 16, 2023Copper Contributor