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

%3CLINGO-SUB%20id%3D%22lingo-sub-1450764%22%20slang%3D%22en-US%22%3EDeveloping%20custom%20web%20part%20to%20display%20Microsoft%20Teams%20Presence%20as%20well%20as%20chart%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1450764%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20to%20develop%20a%20custom%20web%20part%20in%20SharePoint%20Online%20which%20will%20provide%20me%20the%20list%20of%20Active%20users%20on%20Microsoft%20Teams%20based%20on%20presence%20like%20Available%2C%20Away%20etc.%20Also%2C%20I%20would%20like%20to%20develop%20a%20chart%20which%20will%20show%20me%20the%20number%20of%20available%20hours%20of%20each%20user%20on%20each%20day%20on%20Microsoft%20Teams.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20idea%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3ESohaib%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1450764%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
New Contributor

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

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

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