Microsoft finally came around at the beginning of this year to open the option to set the (Teams) presence state via their MS Graph API.
For my Asterisk telephony application this comes in handy as I can now set Teams busy when a user is on the phone.