Poll Graph API endpoint to Teams presence information - microsoft-graph-api

I am looking for MS Graph Subscription (webhook) for the users presence information (still in beta as per https://learn.microsoft.com/en-us/graph/api/presence-get?view=graph-rest-beta&tabs=http) but I can't find any as per the documentation on change notifications
https://learn.microsoft.com/en-us/graph/api/resources/webhooks?view=graph-rest-1.0
If there is change in user presence (e.g Available to Busy etc) a event has to be triggered. Is the only option to poll the endpoint? Any ideas?

Related

Twilio conversations get online users

I am using twilio conversations for chat. I did not find any information on this in the documentation.
My questions are:
Can I get information about whether the users of the conversation are offline or online? If yes, then how to.
Should I manually send the user online status in order for it to be available for other members of the conversation?
This https://stackoverflow.com/a/69429640/19023823 answer did not help me as it shows how to get the online status of the current users. I need to get the online status of the other members of the conversation.
Thanks.
PM for Conversations here. You need to enable reachability on the Service first, then online status will be automatically tracked for SDK users. This info is retrievable via REST API and also exists on a User object via the SDK (and is evented when the status changes).
Once you turn this on, it will be automatically updated for all users of the SDK. You can look at the Participants in a Conversation with await Conversation.getParticipants() and then check their User object's online status with Participant.getUser().isOnline. Alternatively, you can get timely updates about changes to any user's online status by listening for userUpdated events on the client object.

Are there Teams API endpoints available to get channel/call info, such as participant lists?

I'm just wondering if there is currently a production version API for Microsoft Teams available, specifically to gather retrospective participant info from calls/meetings (after the meeting had ended) from an external app? I'm aware of some Teams endpoints being available in Microsoft Graph, but am not sure to what extent these are available?
Thanks for reaching us!
Teams by default generate attendees report and meeting report after completion of meeting call. We can able to see the list of attendees and the report. But at present we don't have any API to fetch list of attendees and their timings.
As this feature is not available at present, could you please raise an User Voice if this needs to be consider as a future request.

Is there a way to use a bot, webhook, or some other connector to be notified when someone joins an online Teams Meeting?

Our company uses Teams Online Meetings extensively. Teams is a great product and is a wonderful communication tool. We have a scenario where we need to be notified when a participant joins a Teams meeting, leaves the meeting, or the meeting ends (all participants have left).
Can a bot, webhook, or connector be setup to listen to those events? Also, these meetings will be dynamically created real-time (not a scheduled event) using the Microsoft Graph API. Can the bot, webhook or connector be programmatically added to the meeting in order to receive the join, leave and end meeting events?
Thanks for your help,
Joe
Yes and No...
The problem is that you can think of a "bot" as a virtual teams client for a bot user. So it has the same limitations as a "normal" client (in most cases). So unless you invite the bot into the call or the bot is already in the call (e.g. started the call) then no you can't do what you want. If the bot IS in the call already then yes you can do what you want. The bot can invite, drop participants and end calls.
There is another way, you can create a Policy Recording Bot and will automatically insert itself into every call for a user that has the policy set to them. There is a overhead that the call start up time is a lot greater and all such calls are now conference calls. So the media is NOT endpoint to endpoint any longer. See the sample for an example of this type of bot.
The other downside would be that Microsoft may not like what you are doing using the Policy Recording Bot for non-recording purposes.

Presence push into Microsoft Teams

Since a couple of months it has been possible to read a users presence and Note via the Microsoft Graph API.
Does anyone know when Microsoft will open up for push and change of a users presence information in Teams via Graph, and will it be possible to do this by means of impersonating the user (that is on behalf of a user)?
We are currently doing the same for Skype for Business by means of the Skype Web API where we push mobile GSM call status information (busy, idle, detached) into SfB.

Microsoft Graph API callRecords Subscription not receiving notifications

I am currently evaluating Microsoft Teams Graph API endpoints for us and our customers. Our goal would be to compile a list of past callRecords for a specific user.
Since the API does not (currently) offer an endpoint to just fetch a list of past/done callRecords we need to subscribe to the /communications/callRecords notifications.
Using the example project specified in the documentation ( https://github.com/microsoftgraph/nodejs-webhooks-rest-sample) we successfully created subscriptions and were also able to update these subscriptions (not part of the example project).
I am running the example project on my local machine using ngrok as suggested.
So far everything works, but we do not get any notification. I made various calls with the Teams Desktop App using the same user that gave admin consent for accessing callRecords but I never received a notification on any test subscription.
The current active subscription in question is "07b23247-66d9-46b9-ac67-a72d5d702628" and was created around 2020-09-09T09:20:00.000Z (I do not have the precise minute/seconds). It since then has also been successfully renewed.
Here is an extract of the subscription creation response:
{
'#odata.context': 'https://graph.microsoft.com/beta/$metadata#subscriptions/$entity',
id: '07b23247-66d9-46b9-ac67-a72d5d702628',
resource: '/communications/callRecords',
changeType: 'created',
expirationDateTime: '2020-09-12T07:20:09.036Z'
}
I do monitor all incoming traffic using ngroks http://127.0.0.1:4040 endpoint and so far I only received the validationToken requests. That tells me that the endpoint does indeed receive requests.
I am currently at a loss as where to look further for an error on my side.
I opened this stack overflow is as it is the requested action to take according to the troubleshoot section of the example project (https://github.com/microsoftgraph/nodejs-webhooks-rest-sample/blob/master/TROUBLESHOOTING.md).

Resources