title: How can I get microsoft graph findMeetingTimes working properly?
body: <p>I've been using Microsoft Graph API methods to retrieve Meeting Suggestion Times but the following error's returned rather than the right object:<br />
  <code>&quot;Code: BadArgument\r\nMessage: Invalid user address\r\nInner error:\r\n\tCode: UnsupportedScenario\r\nAdditionalData:\r\n\tdate: 2021-07-01T15:44:10\r\n\trequest-id: fbb7587c-356f-4e96-80b5-7a684069df79\r\n\tclient-request-id: fbb7587c-356f-4e96-80b5-7a684069df79\r\nClientRequestId: fbb7587c-356f-4e96-80b5-7a684069df79\r\n&quot; </code><br />
  A screenshot of Azure permissions:
  <a href="https://i.stack.imgur.com/Bt73r.jpg" rel="nofollow noreferrer">I'm not allowed to embed images yet.</a><br />
  The scope is &quot;https://graph.microsoft.com/.default&quot;, I tried changing it to &quot;Calendars.ReadWrite.All Users.Read.All&quot; but the error was a bad request, scope not allowed. <br />
  Even with different AuthenticationProvider the resultis the same.</p>
  <pre><code>IConfidentialClientApplication app = ConfidentialClientApplicationBuilder.Create(daemonConfig.ClientId)
                  .WithAuthority(AzureCloudInstance.AzurePublic, daemonConfig.Tenant)
                  .WithClientSecret(daemonConfig.ClientSecret)
                  .Build();
  
  IGraphServiceClient graphClient = new GraphServiceClient(new DelegateAuthenticationProvider(async (requestMessage) =&gt;
              {
                  var scopes = new string[] { daemonConfig.Scope };
                  AuthenticationResult authRes = await app.AcquireTokenForClient(scopes).ExecuteAsync();
                  requestMessage.Headers
                      .Authorization = new AuthenticationHeaderValue(&quot;Bearer&quot;, authRes.AccessToken);
              }));
  
  var meetingResponse = await graphClient.Users[&quot;User@Email.com&quot;]
                  .FindMeetingTimes(attendees, locContraint, timeConstraint, new Duration(new TimeSpan(0, 30, 0)), 5, true, true, 100)
                  .Request()
                  .Header(&quot;Prefer&quot;, &quot;outlook.timezone=\&quot;W. Europe Standard Time\&quot;&quot;)
                  .PostAsync();
  </code></pre>
  <p>However, the following function works properly:</p>
  <pre><code>public Task&lt;User&gt; GetMicrosoftUser(string mail)
          {
              return graphClient.Users[mail]
                  .Request()
                  .GetAsync();
          }
  </code></pre>
  <p>Update 1:
  GetSchedule function is working properly</p>
  <pre><code>await graphClient.Users[&quot;user@email.com&quot;].Calendar
                      .GetSchedule(schedules, end, start)
                      .Request()
                      .Header(&quot;Prefer&quot;, &quot;outlook.timezone=\&quot;W. Europe Standard Time\&quot;&quot;)
                      .PostAsync();
  </code></pre>