msgraph-beta-sdk-python icon indicating copy to clipboard operation
msgraph-beta-sdk-python copied to clipboard

Exception when fetching user

Open cvs79 opened this issue 2 years ago • 0 comments
trafficstars

When using the sample from https://github.com/microsoftgraph/msgraph-beta-sdk-python?tab=readme-ov-file#3-make-requests-against-the-service to fetch a user you get the following error (after applying the workaround from #194)

Exception has occurred: ImportError
cannot import name 'alert_record' from 'msgraph.generated.models.device_management' (/home/c/.local/lib/python3.10/site-packages/msgraph/generated/models/device_management.py)
  File "/home/c/pimpy/pimgraph.py", line 37, in  
    user = await client.users.by_user_id('[email protected]').get()
  File "/home/c/pimpy/pimgraph.py", line 41, in <module>
    asyncio.run(get_user())
ImportError: cannot import name 'alert_record' from 'msgraph.generated.models.device_management' (/home/c/.local/lib/python3.10/site-packages/msgraph/generated/models/device_management.py)

cvs79 avatar Sep 22 '23 10:09 cvs79