graph api
27 TopicsCleaning Out Old Messages from a Team Channel
A question asked about the best way to remove channel messages from Teams. Microsoft 365 retention policies are an option, but you'll have to wait for retention processing to complete. PowerShell helps because you can create a script to remove all messages and replies from a channel. Everything works, but processing is slow, as we discover when we plunge into the details of writing code. https://practical365.com/remove-channel-messages/542Views0likes0CommentsHow to add external users as presenter to online meeting?
I have invited an external user to my AAD and that user accepted the invitation. Now I need to create a Teams meeting using Graph API (https://learn.microsoft.com/en-us/graph/api/application-post-onlinemeetings?view=graph-rest-1.0&tabs=http) and add this user as a presenter to it. Is there any way? Thanks in Advance!1.9KViews0likes3CommentsGraph API to get list of chats with $filter=id eq 'chat-id' is not working
I have recently observed a strange behavior in the Graph API to get chat by id. The following graph call works fine and gives the response. https://graph.microsoft.com/v1.0/chats/19:b8577894a63548969c5c92bb9c80c5e1@thread.v2 However, if I call the graph API with the filter expression like below it doesn't return any response for the same chat id https://graph.microsoft.com/v1.0/chats?$filter=id eq '19:b8577894a63548969c5c92bb9c80c5e1@thread.v2' This again doesn't return empty for all chat-id's, the chats that were not been active for few months are returned empty. However, if we post some message or add/remove member or basically modify something in the chat, the graph call with $filter=id eq 'chat-id' returns the response properly. The graph call with https://graph.microsoft.com/v1.0/chats/19:b8577894a63548969c5c92bb9c80c5e1@thread.v2 returns response even for the inactive chats802Views0likes0CommentsActivity Feed Notification Not getting data assigned to subEntityId in teams mobile client - Tab App
I'm using activityFeedNotification graph api to send push notification to the users of our teams tab app from backend using nodejs. The notification is sending successfully in both teams desktop and mobile client but we're not getting the data assigned to subEntityId in mobile client(In desktop client and browser we're getting it). We are encoding the data(object) and assigning it to the subEntityId in context object from our nodejs application. Then in teams client, we get that data from teams context using microsoft teams sdk and redirect user to the respective page in our application based on whatever data we get in subEntityId In desktop, deeplinking is working perfectly but in android client, we're not getting any data in subEntityId. It is just opening the homepage of our tab app but I need to redirect user to specific page based whatever data is assigned to subEntityId. Below I've provided how we're encoding the data and assigning it to subEntityId. Server Side Code: const context = encodeURIComponent( JSON.stringify({ "subEntityId": { "type": "PROGRAM_PROFILE", "program_id": "12345", uid: uuidv4(), } }) ); const body = { topic: { source: 'text', value: notificationTopic, webUrl: `https://teams.microsoft.com/l/entity/${TEAMS_APP_ID}/index?context=${context}`, }, activityType: 'commonNotification', previewText: { content: notificationSubtitle, }, templateParameters: [ { name: 'title', value: notificationTitle, }, ], }; const url = `https://graph.microsoft.com/v1.0/users/${userId}/teamwork/sendActivityNotification`; await axios.post(url, body)); Client Side Code: const context = await app.getContext(); console.log(context?.page?.subPageId); // getting undefined Any kind of help is appreciated!740Views0likes0CommentsOdata feed permissions to non-team-members
Hi, I am getting my organisation going with using Shifts for Teams, I have some notes, but in general, it's great. The finance dept want the opportunity to create various reports from the raw data themselves from Excel or Power BI (they only know excel, but I'm trying to show them the light!). I can use Odata feed in powerquery to access the data, but I am a member of the teams that I am working with now. I want to be able to grant the users, or 365 groups, who want to view shifts data access to that without them being a member of the team, appearing on the list of members, seeing the chat that comes up, all that jazz. Looking on Graph explorer it looks like the permission I am looking for is "Schedule.Read.All", but that doesn't help me really as I still can't give that permission to others in Graph. Thoughs? Thanks676Views0likes0CommentsAccessing OneDrive through MS teams using Microsoft Graph API
Hi I want to access my OneDrive Files using a custom chatbot inside MS Teams chat with the help of MS Graph APIs. I want to download those files using this chatbot when I provide a URL of the file. EG: if the the file URL is https:/my.sharepoint.com/xyz , then my command to the chatbot should be like "@chatbot download https:/my.sharepoint.com/xyz" and the file should be downloaded inside MS teams. Please suggest a detailed solution if available.1KViews0likes1CommentAPI for MS Teams Apps in Teams Admin Center
Hello Team I need to validate what apps are currently allowed, blocked and submitted in my Teams tenant. i know that there is no direct method to export them from Teams Admin centre, however we can do get some information from GRAPH API I need to export to file that list all apps with the following Name Publisher Status Custom app (optional) With help of https://docs.microsoft.com/en-us/graph/api/appcatalogs-list-teamsapps?view=graph-rest-1.0&tabs=http i could manage to get the information except "STATUS" and CUSTOM APP parameter , on which i could see whether the apps are allowed or BLOCKED https://graph.microsoft.com/v1.0/appCatalogs/teamsApps?$expand=AppDefinitions https://graph.microsoft.com/v1.0/appCatalogs/teamsApps?$filter=distributionMethod eq '1' https://graph.microsoft.com/v1.0/appCatalogs/teamsApps?$filter=distributionMethod eq '0' Also, from the graphAPI explorer, how can i export to an file (CSV) or any another options your timely help would be much appreciated4KViews0likes1CommentCannot access teams from Graph API
Hello, I cannot create and query teams in Teams using the Graph API. It seems like an API error because the Team is visible in Teams for Windows. Steps to reproduce : Create a Team using: https://graph.microsoft.com/v1.0/teams When I check the creation operation the API returns 404 error: https://graph.microsoft.com/v1.0/teams/{team-id}/operations/{operation-id} When I query the team by ID the API returns 404 error: https://graph.microsoft.com/v1.0/teams/{team-id} However when I query the group by ID the API returns the group without errors: https://graph.microsoft.com/v1.0/groups/{team-id} Error when getting the existing team : { "error": { "code": "NotFound", "message": "No team found with Group Id b97baca3-5f1c-4df9-957e-84565abd339a", "innerError": { "message": "No team found with Group Id b97baca3-5f1c-4df9-957e-84565abd339a", "code": "ItemNotFound", "innerError": {}, "date": "2022-05-27T15:15:48", "request-id": "1589738d-3a4b-4a8a-824d-31383bb5a2c4", "client-request-id": "ffaf5d2e-d477-d8a6-63b0-a48b9f0dcbe1" } } }3.9KViews0likes5CommentsHow to get the specific userId for communication between a bot and a particular user
A microsoft teams bot uses a specific user id for communication between bot and a user. This ID is unique for communication between these two. I am trying to get this ID for proactive messaging. I have seen many samples where we get this ID from a particular team channel or between a group chat. But, the problem is i want to get the userID of a user who is not a part of this chat. Example -: If an employee submits a request using bot then his manager should be notified about that request proactively by the bot. How can i achieve that using the Application scope. The bot is installed for bot employee and manager. I couldn't find any example where i can send a message from bot to user of AD or any teams user for that matter even if the bot is installed for them.4.7KViews0likes1CommentGraph API access without using client id and secret key
I have a C# Application that reads O365 groups and teams Information using graph API and generates a report. I am able to read and write teams info using graph API by authenticating using tenant info, client id and secret key (these values come from Azure APP registration). I am trying to avoid this App Registration step(tool requires client id and user login to get information). Is there any possible way to do authentication without client id?(like graph explorer does) https://docs.microsoft.com/en-us/graph/sdks/choose-authentication-providers?tabs=CS Above auth provider link doesn't have any authentication without clientid. Authentication used in the tool: static String[] sca = { "https://graph.microsoft.com/.default" }; var auth = PublicClientApplicationBuilder .Create(clientid) .WithTenantId(tenantid) .Build(); InteractiveAuthenticationProvider authProvider = new InteractiveAuthenticationProvider(auth , sca);Solved10KViews0likes3Comments