Spaces:
Build error
Build error
Download tools/ms_auth.py from sp103107/agent-system: direct link, hf CLI and curl.
- Browser
- Download file 276 Bytes
-
https://huggingface.co/spaces/sp103107/agent-system/resolve/main/tools/ms_auth.py
- Command line
-
hf download hf://spaces/sp103107/agent-system/tools/ms_auth.py
-
curl -L -o ms_auth.py https://huggingface.co/spaces/sp103107/agent-system/resolve/main/tools/ms_auth.py
276 Bytes
| 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 |