Developing custom web part to display Microsoft Teams Presence as well as chart

Copper Contributor



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?




3 Replies
Take a look at Microsoft Teams Graph API + GitHub repositories in regards of control presence in Teams

Hi @Sohaib_Khan ,


For presence information, you can use Microsoft Graph's Presence API and use getPresencesByUserId endpoint.

I have created an example web part displaying presence of team members, which utilizes that endpoint.


For displaying free calendar slots, you can use getSchedule Graph API endpoint:


Hi @Matti Paukkonen,


can you post a screenshot of your custom web part?


Best regards