title: How to properly create an Online Meeting with Micosoft Graph v1.0 with Application permission? I'm getting a Forbidden response
body: <p>Has anyone successfully used the <code>CreateOrGet</code> request to Microsoft Graph v1.0 to create an Online Meeting using Application permissions? I had the Application created on the Azure Portal, and with the client id and secret declare and initialize the <code>GraphServiceClient</code>.</p>
  <p>I have a service(Hangfire Server) which without user interaction does background and out of sync processes and notifications. One of the features is for this server to send organizational communications with embedded links to online Teams meetings. For this, I'm trying to use Client Credential flow</p>
  <p>I have the following permissions in my token:</p>
  <pre class="lang-json prettyprint-override"><code>&quot;roles&quot;: [
    &quot;OnlineMeetings.Read.All&quot;,
    &quot;OnlineMeetings.ReadWrite.All&quot;,
    &quot;User.Read.All&quot;
  ],
  </code></pre>
  <p><img src="https://i.stack.imgur.com/BwfBg.png" alt="Screenshot of Permissions in Azure Portal" /></p>
  <p><strong>The first column has the names of the permissions cut, but the necessary delegate and application permissions are all there, although the screenshot taken a couple of days ago doesn't include the application permission for User.Read.All. I have the Admin's consent on the Application permissions. The name you see painted out is the Directory name.</strong></p>
  <p>I'm using the Client Credentials Provider with the following code:</p>
  <pre class="lang-cs prettyprint-override"><code>    //Client Credentials -  Application
       app = ConfidentialClientApplicationBuilder
           .Create(config.Value.ClientId)
           .WithTenantId(config.Value.Tenant)
           .WithClientSecret(config.Value.ClientSecret)
           .Build();
          
       var scopes = new string[] { &quot;https://graph.microsoft.com/.default&quot; };
          
       graphClient = new GraphServiceClient(new DelegateAuthenticationProvider(async (requestMessage) =&gt; 
       {
      
              // Retrieve an access token for Microsoft Graph (gets a fresh token if needed).
              authResult = await app
                  .AcquireTokenForClient(scopes)
                  .ExecuteAsync();
      
              // Add the access token in the Authorization header of the API request.
              requestMessage.Headers.Authorization =
                          new AuthenticationHeaderValue(&quot;Bearer&quot;, authResult.AccessToken);
              _logger.LogInformation(&quot;Token included in GraphClient: &quot; + authResult.AccessToken);
           })
       );
       OnlineMeeting onlineMeeting = new OnlineMeeting() {.....}
      
       var user = await graphClient.Users[{userPrincipalName}].Request().GetAsync(); //&lt;-- This works with the User.Read.All permission
       _logger.LogInformation(&quot;User: &quot; + JsonConvert.SerializeObject(user, serializerSettings));
       string meetingId = Guid.NewGuid().ToString();
      
       OnlineMeeting createdMeeting = await graphClient.Users[user.Id].OnlineMeetings.CreateOrGet(meetingId, null, onlineMeeting.EndDateTime, 
                          onlineMeeting.Participants, onlineMeeting.StartDateTime,onlineMeeting.Subject).Request().PostAsync(); //&lt;-- This doesn't work, and I'm getting a ServiceException
  </code></pre>
  <p>This is the error I get:</p>
  <pre><code>     StatusCode: Forbidden ResponseBody: {
              &quot;error&quot;: {
              &quot;code&quot;: &quot;Forbidden&quot;,
              &quot;message&quot;: &quot;Application does not have permission to CreateOrGet online meeting on behalf of this user.&quot;,
              &quot;innerError&quot;: {
                    &quot;date&quot;: &quot;2021-03-26T15:55:22&quot;,
                    &quot;request-id&quot;: &quot;6e8466cb-807a-44df-93bf-27d42c413e44&quot;,
                    &quot;client-request-id&quot;: &quot;6e8466cb-807a-44df-93bf-27d42c413e44&quot;
                  }
                }
              }
  </code></pre>
  <p>Any clues as to what might be the problem?</p>