title: Microsoft Graph - Proper way to retrieve attendance report from an Event
body: <p><strong>CONTEXT</strong></p>
  <p>Using application permission i'm creating an event and then retrieve the attendance report from it.</p>
  <p><strong>CODE TO ADD EVENT</strong></p>
  <pre><code>  public static async Task&lt;Event&gt; CreateEventAsync(string emailUser, Event @event, string calendarId)
          {
              try
              {
                  // Add /Events
                  return await graphClient.Users[emailUser].Calendars[calendarId].Events
                      .Request()
                      .AddAsync(@event);
              }
              catch (Exception ex)
              {
                  throw new MosException(ex.Message);
              }
          }
  </code></pre>
  <p><strong>CODE TO GET ATTENDANCE REPORT</strong></p>
  <pre><code>GraphHelper.Initialize();
  var organizer = await GraphHelper.GetUserAsync(emailUser);
  var reponseCalendar = await GraphHelper.GetCalendarAsync(emailUser);
  var graphUserId = organizer.Id;
  
  var linktoWebUrl = &quot;/onlineMeetings?$filter=JoinWebUrl%20eq%20'https://teams.microsoft.com/l/meetup-join/19%3ameeting_YTEz.....etc...'&quot;;
  
  var linkGraph = &quot;https://graph.microsoft.com/v1.0/users/&quot; + graphUserId + linktoWebUrl;
  
  var accessToken = GraphHelper.GetToken().Result;
  var httpClient = new HttpClient();
  var apiCaller = new ProtectedApiCallHelper(httpClient);
  var meetingObject = await apiCaller.CallWebApiAndGetASync(linkGraph, accessToken);
  
  var meeetingIdJson = meetingObject.Last.First.First.First.Last;//&lt;- not cool :(
  var meeetingId = meeetingIdJson.ToString();
  
  var newLink = &quot;https://graph.microsoft.com/beta/users/&quot; + graphUserId + &quot;/onlineMeetings/&quot; + meeetingId + &quot;/attendanceReports &quot;;
  var meetingOnline = await apiCaller.CallWebApiAndGetASync(newLink, accessToken);
  
  var attendanceReportsByUrl = meetingOnline.Last.First.First;//&lt;- not cool :(
  </code></pre>
  <p><strong>RESPONSE</strong></p>
  <p><a href="https://i.stack.imgur.com/ko9ub.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ko9ub.png" alt="Response" /></a></p>
  <p><strong>PROBLEME</strong></p>
  <p>Is there a way to do it in a proper way BUT, of course, from an Event and not an OnlineMeeting?</p>