4

I have 5 users, they all look the same in Office 365 (from what I can see anyway) and have Teams Exploratory licences. I am able to create online meetings (OnlineMeetingProvider="teamsForBusiness" and IsOnlineMeeting=true) for 2 of them. For the other 3 users it doesn't error but doesn't create an online meeting (creates an event?), the response OnlineMeetingProvider is "unknown" and the OnlineMeeting is null. It is the same code so has to be a setting somewhere (all i do is change the id of the user).

The code used to create the request:

        // Create client
        var graphServiceClient = CreateGraphClient();

        // Build event
        var newEvent = new Event()
        {
            Subject = subject,
            Body = new ItemBody() { ContentType = BodyType.Text, Content = body },
            Start = startDate,
            End = endDate,
            IsOnlineMeeting = true,
            Attendees = attendees == null ? null : GetAttendees(attendees),
            OnlineMeetingProvider = OnlineMeetingProviderType.TeamsForBusiness
        };

The erroneous response: enter image description here

Anyone have any idea what is going on?

matt sharp
  • 326
  • 3
  • 11
  • Its because the created users don't have Calendars with "allowedOnlineMeetingProviders" set - not sure where you can update this tho – matt sharp Nov 04 '21 at 13:34
  • 1
    @mattsharp, have the users that do not have `allowedOnlineMeetingProviders` set ever started / logged in to Teams ? – Jos Verlinde Nov 05 '21 at 09:37
  • @JosVerlinde yes exactly that - but its more than just logging in, logging in alone didnt resolve it. I had to create meeting via the Teams UI before the property was set (found out via trial and error) – matt sharp Nov 05 '21 at 09:47
  • I really hope there is a programmatic way to do this – matt sharp Nov 05 '21 at 09:49
  • can you outline the steps that you have used to create / provision the 'non-working' users ? – Jos Verlinde Nov 05 '21 at 09:58
  • To get a non-working user - Create email address via gmail (in organization), add Azure AD user to tenant via Graph Api (C#) and assign Team Exploratory Licence. To get a working user - Create email address via gmail (in organization), add Azure AD user to tenant via Graph Api (C#), assign Team Exploratory Licence, login to Microsoft Teams UI via the Azure AD user and click create meeting now button – matt sharp Nov 05 '21 at 10:03

2 Answers2

2

Had the same problem, I had to add these permissions to the app I was using to create the meeting events:

TeamSettings.Read.All, TeamSettings.ReadWrite.All

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

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

UPDATE: As @lokusking pointed out, even if this is correct, it looks like it does not completely solve the problem. According to my tests, creating a Team event for a new user and getting isOnlineMeeting=true and onlineMeeting properly populated in the response will work only a couple of hours after the user account is created. Note that even with a fresh user the event IS created, just those properties won't contain the right values.

f.cipriani
  • 3,357
  • 2
  • 26
  • 22
  • Life saver, I cant give enough thanks!! Always a permission with this sort of stuff! – matt sharp Nov 25 '21 at 11:42
  • 1
    Even though this is correct, it is not the solution to the question, just another requirement to get it working. Imo this is a bug, that a freshly created user has to log in into teams at least once, before one can create a Teams-meeting in the users calendar. Struggling with the same issue right now – lokusking Dec 07 '21 at 14:14
  • @lokusking did you find a resolution or still in the same boat as me? The fact you have to login with them first is the really annoying part. – matt sharp Feb 22 '22 at 09:56
  • 1
    @mattsharp Nope... Still stuck to the same solution. At least my amount of users is quite small – lokusking Feb 22 '22 at 14:17
  • @lokusking I sent a support request using my Azure subscription to a Microsoft Graph guy. Ive had a lot of "still looking into it emails" but just got a more promising one and fingers crossed on the response: "We are actively working on this case and having an internal discussion on this scenario and trying to gather more details." – matt sharp Mar 07 '22 at 07:12
  • So did it get resolved? – boy Jul 25 '22 at 12:56
  • Nope its a "feature" @boy – matt sharp Jan 16 '23 at 02:24
-1

You can change an existing event to make it available as an online meeting, by setting isOnlineMeeting to true, and onlineMeetingProvider to one of the online meeting providers supported by the parent calendar. The response includes the updated event with the corresponding online meeting information specified in the onlineMeeting property.

https://learn.microsoft.com/en-us/graph/outlook-calendar-online-meetings?tabs=http#example-update-a-meeting-to-make-it-available-as-an-online-meeting

Prasad-MSFT
  • 660
  • 1
  • 3
  • 7
  • 3
    I want to be able to do it on creation like the other users - there shouldn't be a need to update. Its seems to be that because allowedOnlineMeetingProviders isn't set in the calendar that this cannot be online also it wont update to this. Once i log into microsoft teams and click create meeting, the calendar has allowedOnlineMeetingProviders correctly as teamsForBusiness but I have no idea how to do this programmatically – matt sharp Nov 05 '21 at 08:11
  • @mattsharp - Could you please the Graph API call or docs which you are actually trying. Are you using Calender Event API or Online Meeting API? – ChetanSharma-msft Nov 24 '21 at 05:22