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

API 21 Reputation points
2021-08-09T17:54:08.433+00:00

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
![121747-image.png]1
2.-Then I replace ngrokUrl value to my app function url
![121715-image.png]3
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.
121734-image.png
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
    2021-08-09T20:58:34.173+00:00

    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.