Microsoft Graph Api
14 TopicsMicrosoft Graph Api Teams and Channels - filesFolder
Hello everyone, we want to extend the script by Tommy Lee https://www.lee-ford.co.uk/backup-team so that the Team Channels can download the files and folders. With the new Microsoft Graph Api Teams Beta I found the filesFolder see "https://graph.microsoft.com/beta/teams/$Teamsid/channels/$($channelId)/filesFolder". I would like to use this so that we (see script below) can download all files and folders or am I on the wrong way? # List all items in drive $itemList = Invoke-GraphAPICall -URI "https://graph.microsoft.com/v1.0/groups/$($chosenTeam.id)/drive/list/items?`$expand=DriveItem" # Loop through items $itemList.value | ForEach-Object { $item = Invoke-GraphAPICall -URI "https://graph.microsoft.com/v1.0/groups/$($chosenTeam.id)/drive/items/$($_.DriveItem.id)" # If item can be downloaded if ($item."@microsoft.graph.downloadUrl") { # Get path in relation to drive $itemPath = $item.parentReference.path -replace "/drive/root:", "" $fullFolderPath = "$Path/_Backup_Team_Temp_/Files/$itemPath" -replace "//", "/" $fullPath = "$Path/_Backup_Team_Temp_/Files/$itemPath/$($item.name)" -replace "//", "/" # Create folder to maintain structure New-Item -ItemType Directory -Force -Path $fullFolderPath | Out-Null # Download file Write-Host " - Saving $($item.name)... " -NoNewline try { Invoke-WebRequest -Uri $item."@microsoft.graph.downloadUrl" -OutFile $fullPath Write-Host "SUCCESS" -ForegroundColor Green } catch { Write-Host "FAILED" -ForegroundColor Red } } } } else { Write-Host " - Excluding Files..." }4KViews0likes1Commentasked for scope 'OnlineMeetings.ReadWrite.All' that doesn't exist on the resource
I'm trying to get Auth. code for OnlineMeetingsReadWrite.All scope. But it returns an error said: "The application 'HSR Teams Integration' asked for scope 'OnlineMeetings.ReadWrite.All' that doesn't exist on the resource '00000003-0000-0000-c000-000000000000'. Contact the app vendor.". I checked everthing triple times and I can't still figure out where is the problem. Here is my request: https://i.hizliresim.com/m3r21ek.png Here is my api permissions: https://i.hizliresim.com/gsa73fe.png We also have application access policy for this application. Why I'm getting this error ? I checked that client id is correctSolved3.4KViews0likes8CommentsTeams onlinemeeting recording file creating and saving error
Hello team I created an online meeting on the specified group\channel via MS Graph API: Create onlineMeeting When a group user join the meeting, starts meeting recording, and after the meeting ends, the recording file can be correctly created and stored in the Sharepoint file library. But when a non-group user join the meeting, after the meeting ends, we received a message that an error occurred while saving the recording file. I would like to know what is the problem of this error, is there a way to solve it. grateful. Teams group users permission: Group:TeamsMeetingReservation Channel:General Users admin organizer shawn Role Owner Member Example request to create meeting: { "subject" : "{subject}", "startDateTime" : "{StartDateTime}", "endDateTime" : "{endDateTime}", "Participants":{ "Organizer":{ "Identity":{ "User" :{ "Id" : "{OrganizerId}" } } } }, "ChatInfo":{ "ThreadId" : "{ChannelId}" } }Solved3.2KViews0likes16CommentsMS graph API - How can I send the generated events as a message ?
I want to make an online meeting event and send a message to the channel. I made an online meeting event and checked that all mail and notifications work properly. The important thing is that I want to send the event as a message to the channel. When I create event, var @event = new Event { Subject = subject, Body = new ItemBody { ContentType = BodyType.Html, Content = subject }, Start = new DateTimeTimeZone { DateTime = "2020-09-22T14:30:00", TimeZone = "Korea Standard Time" }, End = new DateTimeTimeZone { DateTime = "2020-09-22T14:35:00", TimeZone = "Korea Standard Time" }, Organizer = new Recipient() { EmailAddress = new EmailAddress { Address = groupInfo.Mail, Name = groupInfo.DisplayName } } , Attendees = new List<Attendee>() { new Attendee { EmailAddress = new EmailAddress { Address = ownMail, Name = "name", }, Type = AttendeeType.Required, Status = new ResponseStatus { Response = ResponseType.Accepted } } , new Attendee { EmailAddress = new EmailAddress { Address = groupInfo.Mail, Name = groupInfo.DisplayName }, Type = AttendeeType.Required } }, AllowNewTimeProposals = true, IsOnlineMeeting = true, OnlineMeetingProvider = OnlineMeetingProviderType.TeamsForBusiness, IsOrganizer = false, ResponseStatus = new ResponseStatus() { Response = ResponseType.Organizer } }; result2 = await graphClient.Groups[pGroupId].Events .Request() .Header("Prefer", "outlook.timezone=\"Korea Standard Time\"") .AddAsync(@event); For now, i'm sending back an online meeting url as a message at channel. like this, var chatMessage = new ChatMessage { Subject = result2.Subject, Body = new ItemBody { ContentType = result2.Body.ContentType, Content = result2.Body.Content } }; await graphClient.Teams[pGroupId].Channels[channel.Id].Messages .Request() .AddAsync(chatMessage); I tried this doc, but my events don't have attachments. Please let me know if you have a way. I've been looking all day, but I don't know. Thank you for any help.1.7KViews0likes1CommentAbout subscription teams channel to get change notifications
I subscribed to teams channel through the Graph API: Create subscription In the normal processing case below: I can correctly parse the change notification chat message content by the following code. But when the following error occurs in the program, i get chatMessage.EventDetail is empty. When this error message appears, how should I get the chatMessage.EventDetail content correctly ? Thanks.Solved1.6KViews0likes7CommentsAccess Teams Attendance using RSC permission
Objective When a teams video call finishes, get a list of users who attended the meeting. (ideally with the joined and left times) Approach In a teams app manifest file you can add Resource-specific consent (RSC) Application Permissions: ChannelMeetingParticipant.Read.Group Read the participants of this team's channel meetings. - Allows the app to read participant information, including name, role, id, joined and left times, of channel meetings associated with this team, without a signed-in user. OnlineMeetingParticipant.Read.Chat Read the participants of the meetings associated with this chat. - Allows the app to read participant information, including name, role, id, joined and left times, of meetings associated with this chat, without a signed-in user. Using a teams app with the ChannelMeeting.ReadBasic.Group and OnlineMeeting.ReadBasic.Chat permission I get a notification when a meeting ends. Using: var meetingInfo = await TeamsInfo.GetMeetingInfoAsync(turnContext); I can get the: meetingInfo.Details.MsGraphResourceId which gives me a value that looks like: MSpjY2VhZjE3My04MjBk...Truncated...ZWFkLnYy Questions/Help Needed How do I make use of the RSC permissions granted in the Teams App manifest to now request the participants who attended the meeting? What API call do I need to make? The documentation for this seems lacking? The RSC permission for getting meeting participants is referred to here: https://learn.microsoft.com/en-us/microsoftteams/platform/graph-api/rsc/resource-specific-consent but I am unable to find out how I can make use of this permission to make graph calls? Other comments and posts refer to getting Online Meeting Artifacts (Giving access to recordings, transcripts and attendance report) however this requires the Teams Admin to grant the very broad permission to OnlineMeetingArtifact.Read.All whereas I believe I should be able to do this via permissions granted via RSC which would be granted on a per channel or meeting basis when a user adds the app rather than having access to all meetings. - Also I only want access to the attendees and avoid asking for permissions that give access to meeting recordings which could contain sensitive information. Can you please advise or direct me to where I can find help on how to make use of the ChannelMeetingParticipant.Read.Group and OnlineMeetingParticipant.Read.Chat permission to access the meeting attendees. Many thanks, Daniel Mitchell1.5KViews0likes6CommentsNumber of participants is reported inaccurately on CallRecord endpoint
We have been pulling CallRecord data via Graph API for analysis. One particular record grabbed our attention. According to the JSON return from Graph API there were 40 participants and 60 sessions. However, the online CQD dashboards showed over 120 participants for the call. So we started to troubleshoot and noticed that our logic does not support the session "nextLink" and there were more than 60 sessions for this group call. We fixed it; so now we can support the pagination. However, the "participants" array field in the JSON return still shows 40 participants. We checked all the returns from Graph API. Only the first return that we made against the call-id has the participants section; the rest of the paginated returns for session does not even have a participants section. They only include the session and segment info. I think subsequent returns do not even have the stream metric details either. So is this a expected behavior? Do we need to call the link in nextLink section differently, so that the return includes all the participant data? Thanks1.3KViews0likes12CommentsCreate Event linked to Team Channel
I'm trying to create an event into a calendar that mocks an event created directly on Microsoft Teams. So basically when you create an event via Microsoft Teams you can specify the group & the channel that must be part of the event. I'm using the proper endpoint: https://docs.microsoft.com/en-us/graph/api/user-post-events?view=graph-rest-1.0&tabs=http. This is the info I'm passing as post request : { subject:"Event Subjct", isOrganizer: true, start: { dateTime:"2020-12-29T12:00:00", timeZone:"Pacific Standard Time" }, end: { dateTime:"2020-12-29T14:00:00", timeZone:"Pacific Standard Time" }, isAllDay: false, allowNewTimeProposals: true, isOnlineMeeting: true, attendees: { { emailAddress: { address:"<groupName@emailaddress.ext>", <-- got directly from Azure name:"<TeamGroupName>" }, type:"required" } }, hideAttendees: false, type: "singleInstance", transactionId: "<UNIQUE_ID>", onlineMeetingProvider: "teamsForBusiness" } Note: all values between <..> are placeholder. The event is correctly created but there's no reference on the Team channel group specified in the attendees field. I've search the definition of attendees array and there's nothing specific to note a group+channel in the attendee collection : https://docs.microsoft.com/en-us/graph/api/resources/attendee?view=graph-rest-1.0 Any help? Thanks1.3KViews0likes1CommentGraph api returns 19999 error at 'List Assignments'
Greetings, I am using Microsoft api beta(Education). Among them, I'm using List Assignments, suddenly it returns 19999 error. Code: 19999 Message: Something failed, the API cannot share any more information at the time of the request. I refferd to this site. Does anyone know why this is happening? );1.1KViews0likes3CommentsCreate Event and linked to Group(Teams) Channel (as Add channel)
Hello. I am using microsoft graph api v1 to create event. It done. But I can not add channel of Group(Teams) to it. I have seen it on Microsoft Teams. Do you know it? Please tell me about it or for me some documents. Thanks you very much!Solved1.1KViews0likes3Comments