Forum Discussion
Lakshmi_145
Nov 17, 2023Brass Contributor
Not able to fetch the status of user from Teams using graph client
Hi, We are working on a bot framwerk project where we need to update our bot status based on the status in the ms teams (like available, un available, in a meeting). We have used the below co...
Lakshmi_145
Brass Contributor
Lakshmi_145
Nov 21, 2023Brass Contributor
- Prasad_Das-MSFTNov 23, 2023Microsoft
Lakshmi_145 - If you have added the
Presence.Read
permission on the app registration, using.default
should work. Also, if you want to specify the exact scope, you can replace"https://graph.microsoft.com/.default"
with"https://graph.microsoft.com/Presence.Read"
in your scopes array which i think you are already doing.Secondly, the presence status of a user in Teams can be one of the following: Available, Away, BeRightBack, Busy, DoNotDisturb, Offline, PresenceUnknown. If you are getting "PresenceUnknown", it could be due to one of the following reasons:
- The user is not found.
- The cloud-based mailbox is not available.
- The user or mailbox settings don't allow to share presence.
Could you please verify that?