It looks like you can get a user's presence via API: https://learn.microsoft.com/en-us/graph/api/presence-get?view=graph-rest-1.0&tabs=http. But I can't find any way to get the Teams status itself, specifically this thing:
I've seen various people asking about it in other forums, I assume it doesn't exist yet but maybe somebody knows how, perhaps there's an undocumented way? Thanks!