- Python >= 3.8
- uv (recommended) or pip
$ uv venv
$ source .venv/bin/activate
$ uv sync$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -e ".[examples,ntlm]"Most tests are end-to-end and run against a real tenant. Configure your credentials in a .env file:
export office365_python_sdk_securevars='{username};{password};{client_id};{client_password}'This file is .gitignored. Source it before running tests:
$ . .env
$ pytest # all tests
$ pytest tests/test_sharepoint # specific areaThe test account needs these Azure AD roles assigned:
- Global reader
- Groups admin
- Search admin
- SharePoint admin
- Teams service admin
- Users admin