from O365 import Account def setup_oauth(): client_id = "your_client_id" client_secret = "your_client_secret" account = Account((client_id, client_secret)) if account.authenticate(): print("Authenticated!") return account return None