Home > Blockchain >  Microsoft Graph OnlineMeeting Get JoinWebUrl
Microsoft Graph OnlineMeeting Get JoinWebUrl

Time:12-09

I want to use the Microsoft Graph API to create an OnlineMeeting and wants to get the JoinWebUrl out off the response. How can I do that?

I already have this:

var onlineMeeting = new OnlineMeeting
        {
            StartDateTime = DateTimeOffset.Parse("2021-12-08T21:30:34.2444915 00:00"),
            EndDateTime = DateTimeOffset.Parse("2021-12-08T22:00:34.2464912 00:00"),
            Subject = "User Token Meeting"
        };

        var meeting = await graphClient.Users["mailaccount"].OnlineMeetings
             .Request()
             .AddAsync(onlineMeeting);

CodePudding user response:

You need an organizer for an online meeting. The organizer will provide the location to store information of the meeting inside Teams.

Or at least this is how we are doing it...

var request = new OnlineMeeting
{
    StartDateTime = DateTime.UtcNow,
    EndDateTime = DateTime.UtcNow.AddHours(1),
    Subject = "User Token Meeting",
    Participants = new MeetingParticipants
    {
        Organizer = new MeetingParticipantInfo
        {
            Identity = new IdentitySet
            {
                User = new Identity
                {
                    Id = "<objectId of a real user>"
                }
            }
        }
    },
    AccessLevel = AccessLevel.Everyone,
};

var onlineMeeting = await (await ClientAsync())
    .Communications.OnlineMeetings.Request().AddAsync(request);

CodePudding user response:

I would like something like this:

var onlineMeeting = new OnlineMeeting
        {
            StartDateTime = DateTimeOffset.Parse("2021-12-08T21:30:34.2444915 00:00"),
            EndDateTime = DateTimeOffset.Parse("2021-12-08T22:00:34.2464912 00:00"),
            Subject = "User Token Meeting"
        };

        var meeting = await graphClient.Users["mailaccount"].OnlineMeetings
             .Request()
             .AddAsync(onlineMeeting);

        return meeting.JoinWebUrl.ToString();
  • Related