# Table of contents:
# Introduction
USR is a command introduced with MSNP2.
The command exists in all services, without a request or response payload.
Starts and continues the authentication process.
This command can only be sent once. Any further uses of this command in the same session is Undefined Behaviour.
For the command that is sent when sending a USR command to a Dispatch Server, read XFR.
# Client/Request
# Dispatch Server or Notification Server
# The Initial request
USR TrID security-package I user-handle
security-package defines the authentication scheme, which varies depending on client and protocol version:
- CTP: Clear Text Password. Only in MSNP2.
- MD5: MD5-based authentication. Only in MSNP2 to MSNP7.
- TWN: "Tweener", Passport Compact Token based authentication. Since MSNP8.
- SSO: Single Sign On, like TWN but using policy challenges instead of authentication tickets. Since MSNP15.
# The Subsequent request
USR TrID security-package S {...challenge-args}
Where challenge-args can be anything, but based on security-package it can be:
- MD5: The server's login challenge concatenated with your password.
- TWN: A Passport Compact Token. For Passport SSI 1.4, this is the
from-PPparameter in theAuthentication-Infoheader. For Passport SOAP (RST), this is the<wsse:BinarySecurityToken>of the relevant<wst:RequestSecurityTokenResponse>. - SSO: The same as the arguments used for
TWN, but with the extra parameter being the custom challenge response encoded as base64.
# Switchboard Server
USR TrID user-handle session-id.cookie
Where user-handle is your current user handle.
Where session-id is the Switchboard session ID. Given in XFR.
Where cookie is the Switchboard cookie. Given in XFR.
# Server/Response
# Dispatch Server or Notification Server
# Requesting a Subsequent action
USR TrID OK security-package S {...challenge-response}
Where challenge-response, based on the security-package is:
CTP: Nothing. This parameter is omitted.MD5: The login challenge to concatenate with your password.TWN: The Passport login parameters.SSO: The Passport login policy and a base64-encoded key.
# Successfully authenticated
USR TrID OK user-handle {friendly-name} {email-validated} {account-managed}
Where OK is always OK.
Where user-handle is your user handle.
Where friendly-name is your current friendly (display) name. Removed in MSNP10.
Where email-validated is the account's validation (verification) status,
where 0 is unvalidated ("unverified"), and 1 is validated ("verified"). Added since MSNP6.
Where account-managed is the account's management ("restriction") status,
where 0 is unmanaged ("unrestricted"), and 1 is managed ("restricted"). Added since MSNP8.
If this is set, the Client may log out automatically and ask to use MSN Explorer.
# Switchboard Server
USR TrID OK user-handle friendly-name
Where user-handle is your current user handle.
Where friendly-name is your current friendly (display) name.
# Examples
# Notification Server
# Using CTP
Only in MSNP2.
C: USR 1 CTP I example@hotmail.com password
S: USR 1 OK example@hotmail.com example%20user
# Using MD5
C: USR 2 MD5 I example@hotmail.com
S: USR 2 MD5 S 1234567890.123456789
C: USR 3 MD5 S f59af8f2fa91d38aff7c870c17f99903
S: USR 3 OK example@hotmail.com example%20user 1
# Using TWN
Since MSNP8.
C: USR 4 TWN I example@hotmail.com
S: USR 4 TWN S passport=parameters,neat=huh,lc=1033,id=507
The HTTPS interlude has been moved to the Passport SSI 1.4 article.
C: USR 5 TWN S t=token&p=profile
S: USR 5 OK example@hotmail.com example%20user 1 0
Since MSNP13.
S: BLP 5 AL
# Using SSO
Since MSNP15.
NOTE: This has been line-broken.
Lines beginning with .. followed by a space are continuations of the previous line.
C: USR 6 SSO I example@hotmail.com
S: USR 6 SSO S MBI_KEY_OLD AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
The HTTPS interlude has been moved to the Passport SOAP (RST) article.
The key-encryption interlude has been removed from here and is to reinstated as another article.
An implementation of the response generator is provided as the SolveSSOChallenge function
in the msnp_challenges.cs file.
C: USR 7 SSO S t=ticket&p=HAAAAAEAAAADZgAABIAAAAgAAAAUAAAASAAAA
.. AAAAAAAAAAA7XgT5ohvaZdoXdrWUUcMF2G8OK2JohyYcK5l5MJSitab33scx
.. JeK/RQXcUr0L+R2ZA9CEAzn0izmUzSMp2LZdxSbHtnuxCmptgtoScHp9E26H
.. jQVkA9YJxgK/HM=
S: USR 7 OK example@hotmail.com
S: BLP 7 AL
# Invalid authentication scheme
C: USR 8 BAD I example@hotmail.com
Server disconnects client.
# Invalid username or password
C: USR 9 TWN I example@hotmail.com
S: USR 9 TWN S passport=parameters,neat=huh,lc=1033,id=507
C: USR 10 TWN S t=not*a*passport*ticket&p=not*a*profile*either
S: 911 10
Server disconnects client.
# Child account not authorized
Since MSNP4.
C: USR 11 MD5 I example@hotmail.com
S: USR 11 MD5 S 1234567890.123456789
C: USR 12 MD5 S f59af8f2fa91d38aff7c870c17f99903
S: 923 12
Server disconnects client.
# Account not verified
# Hard block
Since MSNP5.
NOTE: This will show the Account Verification dialog.
C: USR 13 MD5 I example@hotmail.com
S: USR 13 MD5 S 1234567890.123456789
C: USR 14 MD5 S f59af8f2fa91d38aff7c870c17f99903
S: 924 14
Server disconnects client.
# Soft warning
Since MSNP6.
C: USR 15 MD5 I example@hotmail.com
S: USR 15 MD5 S 1234567890.123456789
C: USR 16 MD5 S f59af8f2fa91d38aff7c870c17f99903
S: USR 16 OK example@hotmail.com example%20user 0
# Account restricted
Since MSNP8.
NOTE: This will automatically log you out and force you to use MSN Explorer instead.
C: USR 17 TWN I example@hotmail.com
S: USR 17 TWN S passport=parameters,neat=huh,lc=1033,id=507
C: USR 18 TWN S t=token&p=profile
S: USR 18 OK example@hotmail.com example%20user 1 1
Client disconnects from server.
# Wrong server for this account
C: USR 19 TWN I example@hotmail.com
S: 931 19
Server disconnects client.
# Switchboard Server
C: USR 20 example@passport.com 987654321.123456789.123456789
S: USR 20 OK example@passport.com example%20user
# Known changes
- MSNP3: Removed the
CTPsecurity package. - MSNP6: Added account verification bit to USR OK.
- MSNP8: Added account restriction bit to USR OK and
removed the
MD5security package, and replaced with theTWNsecurity package. - MSNP13: Now also responds with a BLP command containing your privacy mode.
- MSNP15: Added support for the
SSOsecurity package.