@@ -18,12 +18,15 @@ flowchart TD
1818
1919 C --> G{User present to interact?}
2020 G -->|Yes| H[Interactive auth\nsupports MFA, SSO]
21- G -->|No, script or CI| I["ROPC (password grant)\nno MFA, legacy"]
21+ G -->|No| I{Has a browser?}
22+ I -->|Yes, visit URL| N[Device code flow\nheadless CLI, SSH,\nremote server]
23+ I -->|No browser at all| O["ROPC (password grant)\nno MFA, legacy"]
2224
2325 E --> J[with_certificate.py]
2426 F --> K[with_client_secret.py]
2527 H --> L[interactive.py]
26- I --> M[with_user_creds.py]
28+ N --> P[with_device_flow.py]
29+ O --> M[with_user_creds.py]
2730
2831 style A fill:#1a73e8,color:#fff
2932 style B fill:#e8f0fe
@@ -43,6 +46,7 @@ flowchart TD
4346| ** Client secret** | ` with_client_secret(client_id, secret) ` | Daemons, cron jobs, CI/CD — app-only access | — | [ ` with_client_secret.py ` ] ( ./with_client_secret.py ) |
4447| ** Client certificate** | ` with_certificate(client_id, thumbprint, key) ` | Production daemons — app-only, no shared secret | — | [ ` with_client_cert.py ` ] ( ./with_client_cert.py ) |
4548| ** Interactive** | ` with_token_interactive(client_id) ` | Desktop apps, CLI tools — user signed-in | ✅ | [ ` interactive.py ` ] ( ./interactive.py ) |
49+ | ** Device code** | ` with_device_flow(client_id) ` | Headless CLI, SSH, remote servers — user visits a URL | ✅ | [ ` with_device_flow.py ` ] ( ./with_device_flow.py ) |
4650| ** ROPC (password)** | ` with_username_and_password(client_id, user, pass) ` | Automated scripts — user context, no interactivity | ✗ | [ ` with_user_creds.py ` ] ( ./with_user_creds.py ) |
4751| ** National cloud** | ` AzureEnvironment.USGovernmentHigh ` | GCC High, DoD, China — applies to any flow above | varies | [ ` gcc_high.py ` ] ( ./gcc_high.py ) |
4852
0 commit comments