Protocols/MSNP/Passport Unique ID

From NINA Wiki
Jump to navigation Jump to search
MSNP Protocol
Error ListCommandsRelaying Party SuiteSpotlife
XMPPHTTP GatewayTabsActivities
Development ToolsMSNP Grid
PolygamyURLs used by MSN
Protocol Versions
Version 21
Version 18
Version 16
Version 15
Version 14
Version 13
Version 12
Version 11
Version 9
Version 8
IntroductionP2PObject DescriptorDisplay PicturesFile Transfer
Microsoft Messenger for Mac

Passport Unique ID (PUID)

A passport account is associated with an e-mail address (which can be changed), but also an immutable and unique ID: The Passport Unique ID (PUID). This ID is not the same as the Contact ID (CID).

You can view your PUID on the Account Services page of MSN (under the "Credentials" category):

If you're writing a Messenger client, you can retrieve this value in several ways:

Passport 3.0 (Tweener)

If your client uses Passport 3.0 to authenticate, the PUID can be found in the server's response between <psf:PUID> and </psf:PUID>. It contains 16 hexadecimal digits.


If your language does not support 64 bit integers, you can split this value into two 32 bit integers (0x00030000 and 0x83617063 respectively).

Initial Member Profile

The initial member profile received from the NS also contains the PUID. The NS will send the PUID in two parts, the High and Low bit of a 64 bit integer. If you are using a language that supports 64 bit integers you can use bitshifting and bitwise-OR two contact the two fields.

MSG Hotmail Hotmail length
MemberIdHigh: 196608
MemberIdLow: -2090766237

About the PUID

The Passport Unique ID has several purposes. For example, you can store passport account related information using this ID (remember, the ID will not change even if the user changes their e-mail address, therefor their settings would automatically migrate to the new address).

The PUID is also used in notifications (Protocols/MSNP/NOT) received from the NS. You can use the PUID to verify the notification is really for the user (although it is highly unlikely you are sent a wrong Protocols/MSNP/NOT).