Hi @Danish Rizvi
Thank you for posting your question in the Microsoft Q&A forum.
Based on my research, the Microsoft Graph API allows you to retrieve a user's current presence status using:
GET https://graph.microsoft.com/v1.0/users/{userID}/presence
or
GET https://graph.microsoft.com/v1.0/communications/presences/{userID}
Currently, there is no such Graph API available to track how often and how long someone’s status is.
To retrieve presence information for users other than yourself, your application must be granted application-level permissions, such as Presence.Read.All
or Presence.ReadWrite.All
, through Microsoft Entra ID.
You can read more at Microsoft Graph permissions reference - Microsoft Graph | Microsoft Learn
I hope this helps.
If you have further concerns, please feel free to reach me out.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.