title: How to create a Microsoft Teams Meeting as application using Microsoft Graph?
body: <p>I'm working on a calendar web application where I want to create a Teams meeting and add the meeting (the join-URL) to an appointment.</p>
  <p>As not all of my users log in via Microsoft OAuth 2.0 login, I have to create the teams meeting on the server side (as application). I created an Azure app registration for my application and assigned it the API-permission &quot;OnlineMeetings.ReadWrite.All&quot; (Application). My application is using the client credentials authentication flow.</p>
  <p><strong>Now the actual problem:</strong></p>
  <p>I tried to create the onlineMeeting according to this Microsoft doc:
  <a href="https://docs.microsoft.com/de-de/graph/api/application-post-onlinemeetings?view=graph-rest-1.0&amp;tabs=csharp" rel="nofollow noreferrer">Create onlineMeeting</a></p>
  <p>The docs say, that I have to create an &quot;application access policy&quot; to create onlineMeetings as an application (<a href="https://docs.microsoft.com/en-us/graph/cloud-communication-online-meeting-application-access-policy" rel="nofollow noreferrer">Allow applications to access online meetings on behalf of a user</a>)</p>
  <p>So my question is: Is there really no straight forward way to create online meetings? In my opinion this is the most basic thing somebody wants to do when using Microsoft Graph in a Teams context. I can't believe that an admin has to take that much effort and connect oneself with a &quot;Skype for business online&quot;- PowerShell (<a href="https://docs.microsoft.com/en-us/graph/cloud-communication-online-meeting-application-access-policy#configure-application-access-policy" rel="nofollow noreferrer">Configure application access policy</a>) and give the permission for every single user manually. I thought the Azure API permissions should exactly cover cases like that.</p>
  <p>For testing purposes I tried the following, but only got the Microsoft.Graph.ServiceException &quot;Code: General Message: User not found.&quot;. I think this is because my AuthenticationProvider is a ClientCredentialProvider and I am accessing an API for a user.</p>
  <pre><code>var client = new GraphServiceClient(azureService.ClientCredentialProvider);
          var onlineMeeting = new OnlineMeeting()
          {
              StartDateTime = start,
              EndDateTime = end,
              Subject = subject
          };
       
          var test = await client.Me.OnlineMeetings
              .Request()
              .AddAsync(onlineMeeting);
          
  </code></pre>
  <p>Therefore, I also tried it this way (Microsoft.Graph.ServiceException: 'Code: BadRequest
  Message: An error has occurred.):</p>
  <pre><code>var meeting = await client.Communications.OnlineMeetings                    
                  .Request()
                  .AddAsync(onlineMeeting);
              
  </code></pre>
  <p>and that way (Microsoft.Graph.ServiceException: 'Code: BadRequest
  Message: This API is Not supported. createOrGet action is only supported for /me/onlineMeetings/createorGet):</p>
  <pre><code>var meeting = await client.Communications.OnlineMeetings
                  .CreateOrGet(new Guid().ToString(), null, end, participants, start, subject)
                  .PostAsync();
  </code></pre>
  <p>So is there any other API or possibility that would fulfill my requirements? Meanwhile, I am a little frustrated and would be really grateful for any hint.</p>