Teams Presence information is now available via Graph API beta interface. It is fairly simply to test using Graph Explorer by calling /beta/me/presence.
Note: you will need to give a admin consent to these API calls. You can not do this with delegated user permissions.
You may want to refer for Presence API documentation in Docs.Microsoft.Com
When you start testing this with Graph Explorer, you are required to give permissions (use Modify Permissions in Graph Explorer)
You can also use /users/(user-id-guid)/presence to retrieve a specific user’s presence:
And there is also /communications/getPresencesByUserID, which is called using POST and a list of user userids (guids) is provided.
As you can see from the activity, these two demo persons were in a call together when status was queried.
Something to note:
- You can not read or set the custom status message in Teams using Presence API
- You can only get the presence, not to set it
- Read the announcement blog post from Developer.Microsoft.Com