
Windows Live Contacts Service Requirements
The consent token returned from the Delegated Authentication service has two elements that are important to the construction of a call to the Windows Live Contacts service.
-
The Delegated Authentication token (DAT)
-
The Location ID (lid)
The consent token is URL encoded when returned, and typically would be unencoded first to break out the various parts of the consent token listed below.
The lid parameter taken from the consent token is used to identify which address book is to be accessed through the service, and therefore forms part of the service URL.
The DAT value is the token that authenticates the third-party calling application and is verified by the Live Contacts service against the stored user's consent records to ensure that the delegated authority is current and valid for the combination of the calling third party and the address book identified by the lid parameter.
The DAT value then is used to construct the HTTP Authorization Header for the call, in the following manner, for example:
Request.Headers.Add(“Authorization”, “DelegatedToken dt=\”” + DAT + “\””);
The value of this header will be the DAT originally returned by the consent process and must correspond with the user location identified by the request URI; otherwise the call will be rejected.
If the consent authorization or the DAT has expired, then the call will be rejected, and you will need either to request user consent again or renew the consent token.