OnlineMeetingUrl is null and isOnlineMeeting is false while creating event from Graph API

Javeria Rasool 96 Reputation points
2021-11-19T13:02:08.42+00:00

I have integrated Graph API for teams in my product for creating online meeting of teams. I am sending request for event allowing 'isOnlineMeeting' => true, 'onlineMeetingProvider' => 'teamsForBusiness' in body in response I am getting \"onlineMeeting\":null, \"onlineMeetingUrl\":null, \"isOnlineMeeting\":false, \"onlineMeetingProvider\":\"unknown\". Due to this online meeting link isn't generating . Can you guide me what I am doing wrong?. Following are my code guides.

def create_meeting(appointment)
user_id = @USER .get_teams_user
post_meeting_url = "https://graph.microsoft.com/v1.0/users/#{user_id}/events"
response = Faraday.post(post_meeting_url) do |req|
req.headers['Content-Type'] = 'application/json'
req.headers['Authorization'] = "Bearer #{@USER .teams_data.access_token}"
req.body = meeting_object(appointment).to_json
end
response
end

def meeting_object(appointment)
{
'subject' => appointment.customer.try(:name) + "'s Teams Meeting" || 'No name for meeting',
'isOnlineMeeting' => true,
'onlineMeetingProvider' => 'TeamsForBusiness',
'start' => {
'dateTime' => appointment.appointment_start_time,
'timeZone' => 'Pacific Standard Time'
},
'end' => {
'dateTime' => appointment.appointment_end_time,
'timeZone' => 'Pacific Standard Time'
}
}
end
end

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,649 questions
{count} votes

Accepted answer
  1. Javeria Rasool 96 Reputation points
    2021-12-09T06:05:25.803+00:00

    I found something related to this issue from Microsoft Graph API's known issues.
    "Currently, the onlineMeetingUrl property of a Skype meeting event would indicate the online meeting URL. However, that property for a Microsoft Teams meeting event is set to null."
    After Microsoft's resolve, I hope my code will work fine.

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Joel Moss 1 Reputation point
    2022-06-13T15:40:00.69+00:00

    I too am experiencing this exact same problem. The MS account that I am trying to create an event on has an empty value for allowedOnlineMeetingProviders.

    One small difference to what I am doing though, is that I am trying to use the skypeForConsumer provider. So assigning the Teams.* permissions does not work.

    So right now I cannot create an online meeting for any user that has no allowed online meeting providers!

    Can someone help please?

    0 comments No comments

  2. CarlZhao-MSFT 37,216 Reputation points
    2021-11-22T07:44:31.94+00:00

    Hi @Javeria Rasool

    Try this:

    GraphServiceClient graphClient = new GraphServiceClient(authProvider);  
      
                var @event = new Event  
                {  
                    Subject = "Let's go for lunch",  
                    Body = new ItemBody  
                    {  
                        ContentType = BodyType.Html,  
                        Content = "Does noon work for you?"  
                    },  
                    Start = new DateTimeTimeZone  
                    {  
                        DateTime = "2017-04-15T12:00:00",  
                        TimeZone = "Pacific Standard Time"  
                    },  
                    End = new DateTimeTimeZone  
                    {  
                        DateTime = "2017-04-15T14:00:00",  
                        TimeZone = "Pacific Standard Time"  
                    },  
                    Location = new Location  
                    {  
                        DisplayName = "Harry's Bar"  
                    },  
                    Attendees = new List<Attendee>()  
        {  
            new Attendee  
            {  
                EmailAddress = new EmailAddress  
                {  
                    Address = "samanthab@contoso.onmicrosoft.com",  
                    Name = "Samantha Booth"  
                },  
                Type = AttendeeType.Required  
            }  
        },  
                    AllowNewTimeProposals = true,  
                    IsOnlineMeeting = true,  
                    OnlineMeetingProvider = OnlineMeetingProviderType.TeamsForBusiness  
                };  
      
                await graphClient.Users["{user id}"].Events  
                    .Request()  
                    .Header("Prefer", "outlook.timezone=\"Pacific Standard Time\"")  
                    .AddAsync(@event);  
    

    151356-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Fabrizio Cipriani 101 Reputation points
    2021-11-25T10:57:36.877+00:00

    Solved adding these permissions:

    TeamSettings.Read.All
    TeamSettings.ReasWrite.All

    As soon as I added them, onlineMeetingProvider was correctly set to teamsForBusiness and isOnlineMeeting to true.

    onlineMeetingUrl is always null though, but it's possible to get the meeting url from the "onlineMeeting.joinUrl" property, which is correctly populated.


  4. Lucrecia Moralejo 1 Reputation point
    2022-02-08T20:00:22.47+00:00

    Hi! I had the same problem and I found this (in known-issues section) :

    onlineMeetingUrl property is not supported for Microsoft Teams
    Currently, the onlineMeetingUrl property of a Skype meeting event would indicate the online meeting URL. However, that property for a Microsoft Teams meeting event is set to null.

    The beta version offers a workaround, where you can use the onlineMeetingProvider property of an event to verify that the provider is Microsoft Teams. Through the onlineMeeting property of the event, you can access the joinUrl.

    Link: https://learn.microsoft.com/en-us/graph/known-issues#onlinemeetingurl-property-is-not-supported-for-microsoft-teams

    0 comments No comments