await request.AddAsync(sub); : Object reference not set to an instance of an object

Copper Contributor

Hi we are getting the below error while trying to add subscription object with request.
Error: 

Unexpected error subscribing: Object reference not set to an instance of an object.

var request = graphServiceClient.Subscriptions.Request();
var newSubscription = await request.AddAsync(sub);

 

We provided required permissions to associated azure application.

Is there something missing here??

Thanks,
Balram

0 Replies