Skip to main content

Provides a requests session logged in to your Microsoft account

Project description

ms-requests-session

ms-requests-session is a tiny Python library that provides a way to login to your Microsoft account programatically in a requests Session. It is unknown why you would ever want to use this, but that's for you to determine. I just make the library.

Usage

The usage is incredibly simple and straightforward. Just create a new MSRequestsSession object and pass it your creds and a user agent.

from ms_requests_session import MSRequestsSession

session = MSRequestsSession("someone@example.com", "password", "some user agent")

The returned object is a subclass of requests.Session and has you logged in to your Microsoft account.

Known issues

  • Rarely (it seems to occur for Microsoft accounts that have not been accessed for a very long time), a required key may be missing from an API response that is required to be passed to the next. This will prevent you from logging in using ms-requests-session. There may be a way further traverse the chain of requests needed to login, but I have found that logging in to that account manually once seems to get it back in shape to be used with ms-requests-session. If you figure anything out about combatting this, feel free to submit a PR
  • Accounts protected by two-factor auth are not supported, and I have no plans to do so ever

Special thanks

A huge thank you to @Terrance and his SkPy library. He and his library were able to point me in the correct direction for understanding how tricky values such as t work.

The Chromium Dev Tools are your best friend when it comes to reversing services. Do not sleep on them.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ms_requests_session-0.0.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

ms_requests_session-0.0.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file ms_requests_session-0.0.1.tar.gz.

File metadata

  • Download URL: ms_requests_session-0.0.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.5.0

File hashes

Hashes for ms_requests_session-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b524ff475f04c6a3d69dea8ee3bc1cbde5b00cabff40555e518be7b554acbcbb
MD5 5fe760079b890237707d1725cfb092c3
BLAKE2b-256 179ab815086e59cac35f502d5f2e98d6eaf4460f642df8f297bd5f1e705de45f

See more details on using hashes here.

File details

Details for the file ms_requests_session-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ms_requests_session-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d2b770ca9b300b925c11d5a94e7ce75db758e886b684c72e57499e4e9044f14b
MD5 466790c6daf56a66fea4b12875ee597d
BLAKE2b-256 7738c0f7775855932b122135340d6d67e3a0019e94d859e07f7d692acac07202

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page