msgraph-beta-sdk-python
msgraph-beta-sdk-python copied to clipboard
Exception: Invalid key: Google for enum <enum 'ManagementAgentType'>.
trafficstars
While fetching managed devices with the following call :
GraphServiceClient -> device_management.managed_devices.get()
File "[...]\msgraph_beta\generated\models\managed_device.py", line 400, in <lambda>
"managementAgent": lambda n : setattr(self, 'management_agent', n.get_enum_value(ManagementAgentType)),
File "[...]\kiota_serialization_json\json_parse_node.py", line 201, in get_enum_value
raise Exception(f'Invalid key: {camel_case_key} for enum {enum_class}.')
Exception: Invalid key: Google for enum <enum 'ManagementAgentType'>.
File generated is missing a management agent type google, in class ManagementAgentType from generated\models\management_agent_type.py
Manually adding the Google enum in the file fix the issue