Hi,
yes you can use Graph API, more info here
https://developer.microsoft.com/en-us/graph/blogs/microsoft-graph-presence-apis-are-now-available-in-public-preview/
and here
https://learn.microsoft.com/en-us/graph/api/presence-get?view=graph-rest-beta&tabs=http
Best. Luca