> For the complete documentation index, see [llms.txt](https://cookbook.geuer-pollmann.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cookbook.geuer-pollmann.de/azure/python.md).

# Azure Python code snippets

```python
# Python SDK needs these for symmetric service principal authN
os.environ['AZURE_TENANT_ID'] = '...'
os.environ['AZURE_CLIENT_ID'] = '...'
os.environ['AZURE_CLIENT_SECRET'] = '...'

# Want to have all TLS traffic man-in-the-middle-intercepted by Fiddler
os.environ['HTTP_PROXY'] = 'http://127.0.0.1:8888/'
os.environ['HTTPS_PROXY'] = 'http://127.0.0.1:8888/'
os.environ['ADAL_PYTHON_SSL_NO_VERIFY'] = '1'
os.environ['CURL_CA_BUNDLE'] = ''  # https://stackoverflow.com/questions/48391750/disable-python-requests-ssl-validation-for-an-imported-module

credential = DefaultAzureCredential(logging_enable=true)
```
