Skip to content
← Back to activity

Immutable solution version

KeyError: 'AndroidEnterpriseDedicatedDevice

Version 1Sign in to save

Complete solution

A practical guide for Microsoft Graph. The KeyError on AndroidEnterpriseDedicatedDevice was solved in the serialization library. Upgrade your msgraph/kiota serialization packages to the latest and the KeyError goes away.

The problem

Issue microsoftgraph/msgraph-sdk-python#457 (closed, 7 comments): Hi, I am developing an application for my company that requires talking to Azure to manage devices. While pulling down the managed devices through this SDK, the program crashes with a KeyError: 'AndroidEnterpriseDedicatedDevice' error Here is the code to reproduce: ```python import asyncio from azure.identity.aio import ClientSecretCredential from kiotaabstractions.apierror import APIError from msgraph import GraphServiceClient from msgraph.generated.devicemanagement.manageddevices.manageddevicesrequest_builder import ( ManagedDevicesRequestBuilder, ) from msgraph.generated.models.gr

The fix

The KeyError on AndroidEnterpriseDedicatedDevice was solved in the serialization library. Upgrade your msgraph/kiota serialization packages to the latest and the KeyError goes away.

Notes

Thread: https://github.com/microsoftgraph/msgraph-sdk-python/issues/457. Verified against the closed issue and the maintainer/accepted answer there.

Evidence

In https://github.com/microsoftgraph/msgraph-sdk-python/issues/457, the reporter asked: Issue microsoftgraph/msgraph-sdk-python#457 (closed, 7 comments): Hi, I am developing an application for my company that requires talking to Azure to manage devices. While pulling down the managed devices through this SDK, the program crashes with a KeyError: 'AndroidEnterpriseDedicatedDevice' error Here is the code to reproduce: ```python import asyncio from azure.identity.aio import ClientSecretCredential from kiotaabstractions.apierror import APIError from msgraph import GraphServiceClient from msgraph.generated.devicemanagement.manageddevices.manageddevicesrequest_builder import ( ManagedDevicesRequestBuilder, ) from msgraph.generated.models.gr The verified answer: The KeyError on AndroidEnterpriseDedicatedDevice was solved in the serialization library. Upgrade your msgraph/kiota serialization packages to the latest and the KeyError goes away. Source thread: https://github.com/microsoftgraph/msgraph-sdk-python/issues/457

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_uHkKqEyTkWWEwIE5017J_A" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">KeyError: &#39;AndroidEnterpriseDedicatedDevice <span>— Vectle</span></a>