When trying to subscribe to my MSGraph message event i get an error

API 21 Reputation points

Hi everyone i'm doing this tutorial https://learn.microsoft.com/en-us/graph/tutorials/azure-functions
I'll leave the steps i'm doing after finishing the tutorial.

I created an app function in portal.Azure
2.-Then I replace ngrokUrl value to my app function url
3.- I started debugging, WHEN using ngrok, my subscription shows up correctly but when replacing ngrok value for my app function url.
In this part i get an error saying this.
If someone could help me i'd appreciate it.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,394 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,858 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Niko Mix 1 Reputation point

    And Object which you are trying to access, is null (a non initialized object) - can you please ensure, that graphClient is not null at the breakpoint?

    Based on the code from: https://learn.microsoft.com/en-us/graph/tutorials/azure-functions?tutorial-step=4 this get's initialized above from the _clientService.