1

I encountered this error in Python. When import office365.sharepoint.client_context, there is no error. But when doing from office365.sharepoint.client_context import ClientCredential, the error showed:

Import error: cannot import name 'ClientCredential' from 'office365.sharepoint.client_context'

Anyone know how to solve this issue? thank you.

Daisy Miao
  • 11
  • 1

1 Answers1

0

This is probably a little redundant and old question, but the ClientCredential should be imported from runtime.auth.client_credential instead of sharepoint.client_context.

i.e., the below works fine:

from office365.runtime.auth.client_credential import ClientCredential
Parnasus
  • 1
  • 1