PHP Enum do not support missing values, this causes my synchronization job schema get request to fail. #329
Labels
status:waiting-for-triage
An issue that is yet to be reviewed or assigned
ToTriage
type:bug
A broken experience
Describe the bug
I am trying to trigger on an on-demand provisioning job and need to get the synchronization rule ID to do so.
When I get query the api directly, I get a valid response
Response
The document I refer to is Get synchronizationSchema
https://learn.microsoft.com/en-us/graph/api/synchronization-synchronizationschema-get?view=graph-rest-beta&tabs=http
However, when I run it, I get the error: "Handling "App\Message\GetSynchronisationRuleIdMessage" failed: Invalid enum value Secret ".
Expected behavior
Graceful exception handling, when a missing enum value is present.
How to reproduce
SDK Version
2.19
Latest version known to work for scenario above?
No response
Known Workarounds
(failed)
Microsoft support informed me I can bypass the error by querying for the synchronizationRules only using one of the following:
// or with PHP 8
Reason: select is not supported for this endpoint.
Debug output
Click to expand log
``` Handling "App\Message\GetSynchronisationRuleIdMessage" failed: Invalid enum value Secret ".While If you look how java implements Enums.
This is my reasoning:
The Enum Requires that all values are defined.
"Secret"-value is not a defined value.
This bug is the php sdk, BUT in the Java SDK.
This problem is solved differently.
When an enum value does not exit.
It just return null.
source: https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-java/refs/heads/main/src/main/java/com/microsoft/graph/generated/models/AttributeDefinitionMetadata.java
The text was updated successfully, but these errors were encountered: