Presence push into Microsoft Teams - microsoft-graph-api

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.

Related

How to remove chat history from a Microsoft Teams Client running in Kiosk Mode?

On a Kiosk running a Windows PC in a reception area type setting, we would like to run a Microsoft Team Client which can be used to interact with another Teams App (Bot) or a Teams User
We can assign a generic Windows/Azure AD ID so that the Kiosk Windows PC is auto logged in with that ID and then consequently logs into Microsoft Teams with that generic ID (Reception24Kiosk#customer.com for example).
A visitor walks up to the Kiosk. They can then use the already running Teams client to start a chat with the Teams App (bot) or another Teams User.
As Teams client history is persistent, how do we clean up any chat history in the Teams client so that NEXT walk up visitor who uses the Kiosk PC can not see previous chat messages in the Teams client.
We are aware of Teams retention policies and a custom policy could be created for auto deletion but that seems to be measured in number of days. That is too long with this application.
Any way to clear out the chat history on each login to the Teams client (in which case we can somehow force logout the user after each walk up) or another way to reduce the chat history retention to a few minutes?
We have looked at the Microsoft Graph as well, and could not find a way to delete an entire 1:1 chat for a user (even with Delegated permissions)
Any other suggestions from admins who have tried to use Teams in the Kiosk Mode with a generic ID?
Teams client chat history is persistent one. There is no provision to clear out the history on each login. There is Teams retention policy for auto-deletion but as it is measured in number of days, that won't be applicable for your application as you mentioned.

MS Teams - Sending Messages to Users from External App

The organization that I work for previously used Slack as our collaboration tool. With Slack, I was able to register an app in the workspace and use the provided access tokens to invoke the API to send a message to a user from our external web application. It was very straightforward. There was no intermediate app that needed to be coded to enable this messaging.
Recently, we've transitioned from Slack to MS Teams, and in looking over the Graph API documentation, there does not currently appear to be a way to proactively send a message from an external application to a user. The available permissions for the chatMessage endpoint indicate the availability of only a delegated permission to send a message on behalf of a specific user; no permission exists to send a message on behalf of an external application.
Is it possible to use the Graph API to directly send a message from an external application to a user? Or must a bot application be created in order to achieve this?
It must be a bot application to achieve above mentioned requirement. ChatMessage endpoint works to send a message on behalf of user only.

Retrieve users / groups assigned to outlook addin from Microsoft graph

Design
Outlook Add-in that shows sales specific information based on the message (content, sender, etc)
Daemon that subscribes to new messages for the sales team and processes messages as they come in. Runs with application authentication
Scenario
We are developing a multi-tenant add-in that show sales specific information based on the email they are viewing. Since the sales team may be a single person, group or multiple people.
Question
How would the daemon running as an application use the graph to pull in users assigned to it?
Office 365 Admin Screenshot
You would need an Azure AD Application registered with Mail.Read persmissions. The add-in would sign in as the user. Then have the add-in subscribe to the users mailbox on the users behalf. The subscription would include the URL of a backend web api that Microsoft Graph subscription service would call.
You would need to register a new Azure AD Application (if you don't have one created already) for the backend web api. Then you would want to grant the correct permissions scopes to it. For your scenario you would require each tenant to admin consent this application, because you would need access to messages in many users mailboxes using application permission Mail.Read. The reason for this is because the webhook does not call your web api with any user token that you could use to then actual fetch the details of the message.
More info on change notifications (webhooks) is here https://learn.microsoft.com/en-us/graph/webhooks

Are contacts in Skype for Business accessible via Graph API

Just in the title. If a company is using Skype for Business with their Office 365 subscription, are the contacts in skype for business the same contacts available by the Graph API?
My understanding is currently the only way to access Skype for business data from an API standpoint is through the UCWA 2. And that the graph is not reflecting any data for S4B. This is also why those are two different set of permissions when you declare apps in the AAD portal.
One of the reasons behind that is probably because when using the UCWA you need to talk to different resources and endpoint for Discovery and Grant flows before getting to the data.
Another one could be that UCWA provides streaming and some kind of notifications capabilities (status update, messages) which the graph doesn't support right now.
I really hope the S4B endpoints come to the graph at some point, things are going to be simpler.

Using Microsoft Graph API in a Web API without any user interaction screen

Summary:
I have a WinForms app where multiple users from my organization login to.
From within this WinForm app, I want to call my Web API which internally processes some calendar related events (like create new meeting, fetch meeting responses, etc.) for precisely allotted MeetingManager user
Here, we intend to use Microsoft Graph API to do all our stuff
And since the Web API is going to handle this internally at its endpoint, we seek no interactive screen in between (neither for user login nor for granting permissions at consent page). All this should happen in background without any user interaction in between.
How can I achieve this?
Note: I am a beginner to Microsoft Graph API and Web application domain
Graph API Mock up:
You can get this by app-only authentication method. Get an app-only access token and use it for authentication.
I am also struggling on a similar type of question and I need to retrieve planner tasks. For planner tasks app-only scope is not supported but In your case I think it should work
Read both these links for more details.
https://graph.microsoft.io/en-us/docs/authorization/app_only
https://graph.microsoft.io/en-us/docs/authorization/permission_scopes

Resources