Project Description
I need a small, self-contained tool that can perform a basic username-and-password sign-in against our Office 365 tenant, then capture and return the resulting session cookies so my internal apps can reuse them. This is strictly for in-house use, not for penetration testing or external distribution.
Here’s what I’m after:
• A clear, commented script or lightweight executable (Python, PowerShell, or C# are all fine) that presents a simple login form, authenticates with Office 365 via Basic Authentication, and saves the full cookie set to memory and/or disk in a readable format (JSON or plain text).
• A short README explaining any prerequisites—modules, API endpoints, or permissions—and how to run the tool.
• Clean error handling for failed logins, expired credentials, or connectivity issues.
Acceptance criteria:
1. Successful authentication returns the same cookies visible in a standard browser session.
2. No credential data persists beyond what is explicitly saved for the cookies.
3. I can run the script from a Windows workstation without additional licensing requirements.
Please build with security best practices in mind and comment your code so I can adapt it later. Let me know if you need tenant details or test accounts.