msgraph-sdk-php icon indicating copy to clipboard operation
msgraph-sdk-php copied to clipboard

ChangeType enum not handling capitalized values

Open wasdmco opened this issue 2 years ago • 2 comments

We are using v1 (1.109.2) and are seeing problems when handling change notifications: "unhandled enum value Updated" Model/ChangeType.php is stating that it only supports updated/deleted/created (note the lower case words). Notifications apparently have Updated/Deleted/Created (since a new update on the Graph servers ?).

We are seeing this when calling ChangeNotification::getChangeType(). The ChangeNotification object has been created when handling the incoming request that we receive, something like this:

$notificationData = $request->getDecodedJsonContent();
$notification = new ChangeNotification($notificationData);
$changeType = $notification->getChangeType();     <===== Throws!

wasdmco avatar Dec 08 '23 10:12 wasdmco

I noticed this too, it seemed to be a one off hickup that the notification delivered capitalized values, error on the server end?

br4nnigan avatar Mar 25 '24 13:03 br4nnigan

This certainly wasn't a one-off hiccup, and is of very similar nature: https://github.com/microsoftgraph/msgraph-sdk-php/issues/1736

mkarnicki avatar Oct 27 '25 14:10 mkarnicki