title: Microsoft Graph throwing NullReferenceException while Subscribing to Calendar notifications
body: <p>I am encountering a weird problem with Microsoft Graph as this piece of code has been working fine for years in Production but it has recently started to break.</p>
  <p>Microsoft Graph returns a NullReferenceException when I try to subscribe to a user's Calendar notifications.</p>
  <p>I have tested this on an outlook.com email so far. I am using .NET Framework 4.8 and Microsoft.Graph v1.21.0.0.</p>
  <p>Here's my code:</p>
  <pre><code>        public async Task&lt;string&gt; SubscribeToWebhookNotifications(string NewCalendarName)
      {
          var Client = await GetClientAsync();
  
          NewCalendarName = NewCalendarName ?? ExternalAppConfig.MICROSOFT_DEFAULT_CALENDAR;
  
  
          if (string.IsNullOrWhiteSpace(await GetCalendarID(NewCalendarName)))
          {
              throw new BusinessException(&quot;SubscribeToWebhookNotification&quot;, &quot;MicrosoftApp&quot;, string.Format(&quot;Invalid calendar name provided. Calendar Name: {0}&quot;, NewCalendarName), Resource.Manage_SaveSyncConsent_Invalid_Calendar);
          }
  
          var subscription = new Microsoft.Graph.Subscription()
          {
              ChangeType = ExternalAppConfig.MICROSOFT_WEBHOOK_CHANGE_TYPES, // created, updated, deleted
              NotificationUrl = ExternalAppConfig.MICROSOFT_WEBHOOK_NOTIFICATION_URL,
              Resource = ExternalAppConfig.MICROSOFT_WEBHOOK_EVENT_RESOURCE,
              ExpirationDateTime = DateTime.Now.AddMinutes(4230),
              ClientState = ExternalAppConfig.MICROSOFT_WEBHOOK_SECRET_VALUE,
          };
  
          var data = await Client.Subscriptions
                  .Request()
                  .AddAsync(subscription); // This is the piece of code that throws a NullReferenceException 
  
          return data.Id;
      }
  </code></pre>