microsoftgraph / microsoftgraph/msgraph-sdk-php
Invalid enum value "doesNotExist" Win32LobAppFileSystemOperationType
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 669
- Forks
- 150
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 3
Description
Describe the bug
It seems like calling the following produces an error: (v2.31.0)
$appsResponse = $this->graphServiceClient->deviceAppManagement()->mobileApps()->get()->wait();
The Variables inside JsonParseNode.php:171 (getEnumValue) are:
$this->jsonNode = "doesNotExist"
$targetEnum = Microsoft\Graph\Generated\Models\Win32LobAppFileSystemOperationType
This call produced no error with the old version v1.111:
$apps = $this->graph->createCollectionRequest('GET', '/deviceAppManagement/mobileApps')
->setReturnType(Model\MobileApp::class)
->execute();
Stacktrace:
[2025-04-09T13:25:39+0200] [DEBUG] Exception: Invalid enum value doesNotExist
[2025-04-09T13:25:39+0200] [DEBUG] /vendor/microsoft/kiota-serialization-json/src/JsonParseNode.php:171
[2025-04-09T13:25:39+0200] [DEBUG] /vendor/microsoft/microsoft-graph/src/Generated/Models/Win32LobAppFileSystemRule.php:65
[2025-04-09T13:25:39+0200] [DEBUG] /vendor/microsoft/kiota-serialization-json/src/JsonParseNode.php:147
[2025-04-09T13:25:39+0200] [DEBUG] /vendor/microsoft/kiota-serialization-json/src/JsonParseNode.php:120
[2025-04-09T13:25:39+0200] [DEBUG] /vendor/microsoft/kiota-serialization-json/src/JsonParseNode.php:95
[2025-04-09T13:25:39+0200] [DEBUG] /vendor/microsoft/kiota-serialization-json/src/JsonParseNode.php:94
[2025-04-09T13:25:39+0200] [DEBUG] /vendor/microsoft/microsoft-graph/src/Generated/Models/Win32LobApp.php:61
[2025-04-09T13:25:39+0200] [DEBUG] /vendor/microsoft/kiota-serialization-json/src/JsonParseNode.php:147
[2025-04-09T13:25:39+0200] [DEBUG] /vendor/microsoft/kiota-serialization-json/src/JsonParseNode.php:120
[2025-04-09T13:25:39+0200] [DEBUG] /vendor/microsoft/kiota-serialization-json/src/JsonParseNode.php:95
[2025-04-09T13:25:39+0200] [DEBUG] /vendor/microsoft/kiota-serialization-json/src/JsonParseNode.php:94
[2025-04-09T13:25:39+0200] [DEBUG] /vendor/microsoft/microsoft-graph/src/Generated/Models/MobileAppCollectionResponse.php:35
[2025-04-09T13:25:39+0200] [DEBUG] /vendor/microsoft/kiota-serialization-json/src/JsonParseNode.php:147
[2025-04-09T13:25:39+0200] [DEBUG] /vendor/microsoft/kiota-serialization-json/src/JsonParseNode.php:120
[2025-04-09T13:25:39+0200] [DEBUG] /vendor/microsoft/kiota-http-guzzle/src/GuzzleRequestAdapter.php:170
[2025-04-09T13:25:39+0200] [DEBUG] /vendor/php-http/promise/src/FulfilledPromise.php:39
[2025-04-09T13:25:39+0200] [DEBUG] /vendor/microsoft/kiota-http-guzzle/src/GuzzleRequestAdapter.php:145
[2025-04-09T13:25:39+0200] [DEBUG] /vendor/microsoft/microsoft-graph/src/Generated/DeviceAppManagement/MobileApps/MobileAppsRequestBuilder.php:194
[2025-04-09T13:25:39+0200] [DEBUG] /Mycode.php
Expected behavior
No error, enum exists, idk
How to reproduce
$appsResponse = $this->graphServiceClient->deviceAppManagement()->mobileApps()->get()->wait();
The Variables inside JsonParseNode.php:171 (getEnumValue) are:
$this->jsonNode = "doesNotExist"
$targetEnum = Microsoft\Graph\Generated\Models\Win32LobAppFileSystemOperationType
SDK Version
v2.31.0
Latest version known to work for scenario above?
v1.111.0
Known Workarounds
Add the enum into the class inside vendor folder via composer patch:
"extra": {
"patches": {
"microsoft/microsoft-graph": [
"patches/microsoft-graph-Win32Lob.patch"
]
}
},
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the mobileApps()->get() call on SDK v2.31.0 and start with JsonParseNode.php:171 and Generated/Models/Win32LobAppFileSystemRule.php:65. Compare the Win32LobAppFileSystemOperationType definition with the supplied microsoft-graph-Win32Lob.patch and the v1.111 behavior. Done means the collection response parses the doesNotExist value without the reported invalid-enum exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100