Jun 09 2020 05:36 AM
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 like to develop a chart which will show me the number of available hours of each user on each day on Microsoft Teams.
Any idea?
Thanks,
Sohaib
Jun 09 2020 09:12 AM
Jun 09 2020 08:16 PM
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-...
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
Mar 16 2023 08:19 AM