microsoftgraph / microsoftgraph/msgraph-sdk-php

Invalid enum value appleACMEDEPUDAModernAuth

Open
#1,635 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dependency:metadata type:bug
Dominant language
PHP
Stars
669
Forks
150
Avg merge
15h 21m
Merged PRs (30d)
3

Description

Describe the bug

Unable to retrieve managed device list.

Expected behavior

ManagedDevice object can be obtained.

How to reproduce

$requestConfiguration = new ManagedDevicesRequestBuilderGetRequestConfiguration();
$queryParameters = ManagedDevicesRequestBuilderGetRequestConfiguration::createQueryParameters();
$requestConfiguration->queryParameters = $queryParameters;

$result = $graphServiceClient->deviceManagement()->managedDevices()->get($requestConfiguration)->wait();

SDK Version

v2.23.0

Latest version known to work for scenario above?

No response

Known Workarounds

Add the following to Models/DeviceEnrollmentType.php
public const APPLE_ACME_DEP_UDA_MODERN_AUTH = "appleACMEDEPUDAModernAuth";

Debug output
Click to expand log ``` InvalidArgumentException: Invalid enum value appleACMEDEPUDAModernAuth in /var/www/exment/vendor/microsoft/kiota-abstractions/src/Enum.php:57 Stack trace: #0 /var/www/exment/vendor/microsoft/kiota-serialization-json/src/JsonParseNode.php(170): Microsoft\Kiota\Abstractions\Enum->__construct() #1 /var/www/exment/vendor/microsoft/microsoft-graph/src/Generated/Models/ManagedDevice.php(369): Microsoft\Kiota\Serialization\Json\JsonParseNode->getEnumValue() #2 /var/www/exment/vendor/microsoft/kiota-serialization-json/src/JsonParseNode.php(147): Microsoft\Graph\Generated\Models\ManagedDevice->Microsoft\Graph\Generated\Models\{closure}() #3 /var/www/exment/vendor/microsoft/kiota-serialization-json/src/JsonParseNode.php(120): Microsoft\Kiota\Serialization\Json\JsonParseNode->assignFieldValues() #4 /var/www/exment/vendor/microsoft/kiota-serialization-json/src/JsonParseNode.php(95): Microsoft\Kiota\Serialization\Json\JsonParseNode->getObjectValue() #5 [internal function]: Microsoft\Kiota\Serialization\Json\JsonParseNode::Microsoft\Kiota\Serialization\Json\{closure}() #6 /var/www/exment/vendor/microsoft/kiota-serialization-json/src/JsonParseNode.php(94): array_map() #7 /var/www/exment/vendor/microsoft/microsoft-graph/src/Generated/Models/ManagedDeviceCollectionResponse.php(35): Microsoft\Kiota\Serialization\Json\JsonParseNode->getCollectionOfObjectValues() #8 /var/www/exment/vendor/microsoft/kiota-serialization-json/src/JsonParseNode.php(147): Microsoft\Graph\Generated\Models\ManagedDeviceCollectionResponse->Microsoft\Graph\Generated\Models\{closure}() #9 /var/www/exment/vendor/microsoft/kiota-serialization-json/src/JsonParseNode.php(120): Microsoft\Kiota\Serialization\Json\JsonParseNode->assignFieldValues() #10 /var/www/exment/vendor/microsoft/kiota-http-guzzle/src/GuzzleRequestAdapter.php(170): Microsoft\Kiota\Serialization\Json\JsonParseNode->getObjectValue() #11 /var/www/exment/vendor/php-http/promise/src/FulfilledPromise.php(39): Microsoft\Kiota\Http\GuzzleRequestAdapter->Microsoft\Kiota\Http\{closure}() #12 /var/www/exment/vendor/microsoft/kiota-http-guzzle/src/GuzzleRequestAdapter.php(145): Http\Promise\FulfilledPromise->then() #13 /var/www/exment/vendor/microsoft/microsoft-graph/src/Generated/DeviceManagement/ManagedDevices/ManagedDevicesRequestBuilder.php(65): Microsoft\Kiota\Http\GuzzleRequestAdapter->sendAsync() #14 /var/www/exment/storage/app/plugins/MsDeviceSync/Graph.php(149): Microsoft\Graph\Generated\DeviceManagement\ManagedDevices\ManagedDevicesRequestBuilder->get() ```
Configuration

No response

Other information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Models/DeviceEnrollmentType.php and follow the ManagedDevice parsing path identified in the stack trace. Reproduce the managed-devices request described in the issue and verify that the appleACMEDEPUDAModernAuth value is accepted without InvalidArgumentException; done means the managed device list can be retrieved.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.