I'm doing this tutorial https://learn.microsoft.com/en-us/graph/tutorials/azure-functions, everything works fine when i use ngrok but if i replace ngrok value with my azure url app function, i get an error in the createdSubscription variable
var subscription = new Subscription
{
ChangeType = "created",
NotificationUrl = $"{notificationHost}/api/Notify",
Resource = $"/users/{payload.UserId}/mailfolders/inbox/messages",
ExpirationDateTime = DateTimeOffset.UtcNow.AddHours(5),
ClientState = Notify.ClientState
};
// POST /subscriptions
var createdSubscription = await graphClient.Subscriptions
.Request()
.AddAsync(subscription);
saying this System.NullReferenceException: 'Object reference not set to an instance of an object.', as i said before if i use ngrok everything works but if i use my azure url, no