Microsoft Graph API: Is there a way to get the user's acitivity feed of teams? - microsoft-graph-api

We want to get the number of acitivities for a user, which is also shown as badge in the teams app.
I didn't found any direct way. Does anyone found a way to achieve this indirectly?

There is no such way to get all the activity of an user in Teams.
You can look into Subscription Graph API. It allows a client app to receive change notifications about changes to data in Microsoft Graph. Currently, subscriptions are enabled for the following resources:
An alert from the Microsoft Graph Security API
A conversation in an Office 365 group
Content in the hierarchy of a root folder driveItem
in OneDrive for Business, or of a root folder or subfolder driveItem
in a user's personal OneDrive
A list under a SharePoint site
A message, event, or contact in Outlook
A user or group in Azure Active Directory
See Use the Microsoft Graph API to get change notifications for the possible resource path values for each supported resource.

Related

MS Teams - Allow attendees report using Graph API for the online meetings

Is there any way to allow the attendees to report using Graph API for the online meetings?
as nothing clear from Microsoft documentation here about the property needs to be sent in the request body.
I was able to enable it manually from the MS Team App in the meeting settings, but not able to do it using the Graph API.
As an admin, you control whether meeting organizers can download meeting attendance reports by setting a Teams meeting policy. By default, the ability to download the report is turned on.
Microsoft Graph API currently doesn't provide any way to allow attendees to report using Graph API for online meetings.

Move email from Inbox to Microsoft group mailbox in Outlook web add-in

I am working on custom outlook web add-in where I need to move the email from my Inbox to the selected Microsoft Group mailbox programmatically.
I checked the move-message endpoint https://learn.microsoft.com/en-us/graph/api/message-move but that requires destination folder Id which I am not able to get it.
Is this possible using Graph API or any other way?
The Graph API doesn't support moving messages between mailboxes so what you described wouldn't work at least with the move operation even if you had the Id. There are also some limitations around shared mailboxes in add-ins https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/delegate-access?tabs=windows

Get the media file from SharePoint after getting a callRecord notification

I have subscribed to /communications/callRecords to get notifications whenever a call is available in Teams. At the moment the call is saved in SharePoint under the Recordings folder.
Is there a way in the Microsoft Graph API to link the callRecord to a file in SharePoint Drive to download it?
Thanks.
AFAIK the above feature is not available. Rather you may want to subscribe to callrecords and see if it provides the location or not.

What Microsoft Graph root resources to use while sending GET request to OneDrive API from an Azure registered web application?

I have an enterprise application which was registered in the Azure portal, the application is able to get an access token by issuing OAuth2.0 request, my question is what is the exact GET request it should send to start interacting with the OneDrive resource?
Should I register it under a specific AD group in order for it to have the right permissions? Please advise on how to get to a state where this app can interact with the OneDrive API, upload and get files from a specific location.
what is the exact GET request it should send to start interacting
with the OneDrive resource?
You can get started from the OneDrive API for Graph
Should I register it under a specific AD group in order for it to have the right permissions?
No need specific AD group. Just to grant the permission for Graph follow the following steps:
Navigate to your app in the add application list.
Click the Configure and then permissions under the API access.
Click the Add to add "Microsoft Graph".
Check the permission on SharePoint/OneDrive such as "Create, edit, and delete items and lists in all site collections/ Read and write user files/ Read user files" and then Save. Then click the Grant Permission to let the permission take effect.

How to get SharePoint site id from a Microsoft Team channel using Microsoft Graph API?

I am building a custom tab app for Microsoft Teams which needs to list the documents which belong to the channel where the tab app is installed. These documents are hosted on Microsoft SharePoints.
So far, the listing is working using the Microsoft Graph API endpoint
https://graph.microsoft.com/beta/groups/{group-id-for-teams}/drive/root/children, see here
The issue with this endpoint is that it lists all the documents for a group, and not a specific channel.
The {group-id-for-teams} is given by the microsoft teams context, with the channel Id.
Is there a way to retrieve only the documents associated to a team channel from a channel id?
Given that if the user is changing the name of a channel, after the channel was created, the site name is not changed.
So, we can't rely on the channel name when listing all the documents.
Thanks for your feedback!
there are no stable correlations between a channel id and a SharePoint folder. So we can't get SharePoint site id from a Microsoft Team channel using Microsoft Graph API.
we can't rely on their names (except for channel "General"), because if the name of the channel is changed through Microsoft Teams, the SharePoint folder name is not changed.
You are right. So though the root/children will return lists all the documents for a group, and almost each specific channel has its corresponding folder. But we may find some channel doesn't have sub folder or some folder doesn't have corresponding channel.

Resources