While trying to use graph service client to add/update user, below screenshot mentions the behavior in case user doesn’t exist.
If we notice Error block, Code ‘Request_ResourceNotFound’ clearly states that requested user is not found.
Unfortunately, I am not able to repo the scenario where object reference Null exception is thrown.
Couple of things to check here –
- Make sure you are using updated version of SDK.
- Check if NULL exception you are getting is because of some code. Isolate the call from code and check the behavior.
- Check how exception is handled/thrown from catch.
Let me know if this helps 😊