Graph API Teams filesFolder fails - microsoft-graph-api

We are using MS Graph API Teams API to create a filesFolder in a private channel
We find out that GET of :
/teams/f341------b12e/channels/19:9081-----b41c#thread.tacv2/filesFolder
answers 404 with this message :
"Folder location for this channel is not ready yet, please try again later"
(actual ids replaced)
-> if we retry it succeeds after several minutes (!).
While sharing a file in Teams of creating a site in SharePoint with MS365 admin is instantaneous.
Is there a way to have the sharepoint filesFolder created quickly ?
Or is it that there is no SLA on this part of the API ?

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.

Can't get team using Graph API and Teams free

Are there any known issues with using the Graph API to talk to Teams, when it's the free offer?
I can authenticate to the Graph endpoint and retrieve my user details, setting the AAD tenant to my "default directory". If I look at my group memberships with GET /me/memberOf, I can see that there are Microsoft 365 groups for each of my teams. But as soon as I try to do anything Teams-related, like GET /teams/{group_id} I get a 403 error: "Failed to execute Skype backend request GetThreadS2SRequest."

Getting hosted content bytes using Microsoft Graph returns HTTP 403 Forbidden

We've been trying to download the bytes of hosted content attachments embedded in Team messages using the Microsoft Graph, but we encounter HTTP 403 Forbidden errors. It happens when the authenticated user becomes a member of an existing team using the Graph, then uses the GET chatMessageHostedContent beta API on a hosted content attachment.
These are the reproduction steps:
In the Teams browser or desktop application:
Log in to your Office 365 tenant using a licenced user A,
Create a new public team,
In this team, create a new public channel,
In this channel, create many hosted content attachments in multiple messages: copy-pasted images using the Snipping Tool, code snippets.
In the Microsoft Graph Explorer or any C# application that uses the Microsoft Graph Beta nuget package:
Log in using to the same tenant, but as another user B, who is at least Teams Administrator and SharePoint Administrator
Add this user as a member of new newly created team
Get all the messages
Download the bytes of all hosted content attachments
You will get HTTP 403 Forbidden errors on all hosted content attachments downloads.
There is a way to make it work, but it involves "manual work" that cannot be done programmatically:
As user B, open the channel in the Teams application UI (in Fiddler, we see HTTP 403 but at some point it starts to work)
Or, instead of joining the group using the Graph, still as user B, join the team using the Teams application UI
Each of these two solutions seems to trigger a permission synchronization process that cannot be done using the Graph only. Once they're done, downloading the hosted content bytes using the Graph works.
We also noticed that we don't get HTTP 403 for hosted content embedded in the General primary channel for some reason.
Is there anything we've missed?
My team was facing this same issue and ended up rectifying it by switching from delegated permissions on a service account to using application permissions.
At the time of writing this the Get hosted content api is a protected API and required approval to use. More info: https://learn.microsoft.com/en-us/graph/teams-protected-apis

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

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.

Accessing and creating Teams Chats via Graph API

I'm going over the Microsoft Teams section of the Graph API and trying to find out how to do two things:
Create a new chat, giving it a topic that correlates to an entity in our app (essentially creating a chat around an entity), invite specific users into it, and send messages to the chat.
Access the currently logged-in user's private chats, filtered by their topic, and show their contents inside our app.
For #2, it looks like it should be possible using beta endpoint of the Graph API, but I get 403 Forbidden errors both in the Graph Explorer when trying to access https://graph.microsoft.com/beta/me/chats, and in my own app, after enabling the Chat.Read permissons for it.
For #1, it looks like the API doesn't officially support creating new chats at all.
Is there any approach we can use to create and manage chats? Is there an alternative, perhaps not MicrosoftGraph-based API?
as you mention, the ms graph doesn't yet support initiating group chat. You would use the MS Bot Framework for this: https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/bots/bot-conversations/bots-conv-proactive
I see the docs on these Chat api do exist, but they are not present in the Graph Explorer. I tired testing them in the OfficeApiEditor tool with a v2.0 App Registration and Delegated permissions (Chat.Read) and i get this:
Failure - Status Code 500
"code": "InternalServerError",
"message": "Error while processing response.",
so maybe it will take some time before they are really available in beta.
In MS teams, there is a api called ChatMessage to post a message to a chat(only if the chat already exist or started). But, there is no api to create/start a new chat. I have raised a feature request. Do vote for this to suggest this idea to Microsoft.
https://microsoftteams.uservoice.com/forums/913786-microsoft-teams-free/suggestions/38776681-it-would-be-awesome-l-if-there-is-an-api-functiona

Resources