Yes, you can retrieve information about a user's presence in Microsoft Teams using Microsoft Graph API. The presence information is available through the beta version of the API.
Here's an example of how you can make a Microsoft Graph API call to get a user's presence:
http
Copy code
GET https://graph.microsoft.com/beta/me/presence
This API call retrieves the presence information for the authenticated user. You can replace me
with the user's ID if you want to get the presence information for a specific user.
Note: Using beta endpoints means the API is not yet finalized and may be subject to change. Ensure you check the Microsoft Graph API documentation for any updates or changes.
Additionally, make sure your application has the necessary permissions to access presence information. You might need thePresence.Read`or `Presence.Read.All
delegated permission.
Always follow Microsoft's best practices for authentication and authorization when working with Microsoft Graph API.