Search code examples
c#microsoft-graph-apibotframeworkmicrosoft-teams

How to Record Team meeting From as azureBot


i am using this code to join and record ongoing meeting, I am able to join the meeting but not able to record it. I am using following code for join and recording.They are asking for compliance policy and third party "callcabinet" for enabling recording. i just enabled calling policy but should i have to get subscription of "callcabinet" also. Please help me in how to record team meeting using my azure bot. Please help me, this is my humble request.

 public async Task<Call> JoinScheduledMeeting(string meetingUrl)
        {
            try
            {
                MeetingInfo meetingInfo;
                ChatInfo chatInfo;

                (chatInfo, meetingInfo) = JoinInfo.ParseJoinURL(meetingUrl);

                var call = new Call
                {
                    CallbackUri = $"{this.configuration[Common.Constants.BotBaseUrlConfigurationSettingsKey]}/callback",
                    RequestedModalities = new List<Modality>()
                    {
                        Modality.Audio
                    },
                    MediaConfig = new ServiceHostedMediaConfig
                    {
                    },
                    ChatInfo = chatInfo,
                    MeetingInfo = meetingInfo,
                    TenantId = (meetingInfo as OrganizerMeetingInfo)?.Organizer.GetPrimaryIdentity()?.GetTenantId()
                };

                var statefulCall = await graphServiceClient.Communications.Calls
                        .Request()
                        .AddAsync(call);

                var clientContext = "clientContext-value";
               
               var status = RecordingStatus.NotRecording | RecordingStatus.Failed | RecordingStatus.Recording;

                await graphServiceClient.Communications.Calls[statefulCall.Id]
                    .UpdateRecordingStatus(status, clientContext)
                    .Request()
                    .PostAsync();


                return statefulCall;
            }
            catch (Exception e)
            {
                return null;
            }
        }

Solution

  • You have to assign a recording policy to a set of users. The recording bot will not be allowed to record unless a user with a recording policy joined the call or meeting.

    You have to enabled policy certification first.

    You have to take vendor certification. For vendor certification send mail to Teamscategorypartner@microsoft.com.

    Doc Reference - Compliance recording policy assignment and provisioning