I have an Office365 Web API to fetch mail from the following URL:
I have created a subscription for getting notifications from the graph service. However, I can not set the expiration time for the subscription to more than 4230 minutes. While I searched in Microsoft website I got this default time. While I add more than 4230 minutes in the request to the Graph I get BadRequest error code.
Following is the request code:
Subscription subscription = new Subscription
{
Resource = "me/mailFolders('Inbox')/messages",
ChangeType = "created",
NotificationUrl = ConfigurationManager.AppSettings["ida:NotificationUrl"],
ClientState = Guid.NewGuid().ToString(), ExpirationDateTime = DateTime.UtcNow +
new TimeSpan(0, 0, 11115, 0) // shorter duration useful for testing
};
Can anyone suggest me how to override the default time in the graph API?
