Code is stucked after authentication #867
Unanswered
brenosilva
asked this question in
Q&A
Replies: 1 comment
-
better use this construct: if not account.is_authenticated:
account.authenticate() Also can u enable logs: import logging
o365_logger = logging.getLogger('O365')
o365_logger.setLevel(logging.DEBUG) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello @janscas
I´m starting testing O365 library using this small piece of code but it is stucked after authentication message and didn´t retrieve users information:
`from O365 import Account
credentials = ('APP_ID_HERE', 'SECRET_ID_HERE')
account = Account(credentials, auth_flow_type='credentials', tenant_id='TENANT_ID_HERE')
if account.authenticate():
print('Authenticated!')
directory = account.directory()
for user in directory.get_users():
print(user)`
user@Ubuntu2204:~/tenchisecurity/o365$ python3 auth.py
Authenticated!
I would appreciate any help.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions