GetIdentityFromToken is used to retrieve the identity the supplied token is associated with. If the token is not a valid token null will be returned.
Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)
Syntax
'Declaration
Public Function GetIdentityFromToken ( _
    requestContext As TeamFoundationRequestContext, _
    token As OAuthToken _
) As Identity
public Identity GetIdentityFromToken(
    TeamFoundationRequestContext requestContext,
    OAuthToken token
)
public:
Identity^ GetIdentityFromToken(
    TeamFoundationRequestContext^ requestContext, 
    OAuthToken^ token
)
member GetIdentityFromToken : 
        requestContext:TeamFoundationRequestContext * 
        token:OAuthToken -> Identity
public function GetIdentityFromToken(
    requestContext : TeamFoundationRequestContext, 
    token : OAuthToken
) : Identity
Parameters
- requestContext 
 Type: Microsoft.TeamFoundation.Framework.Server.TeamFoundationRequestContext- Request Context may be any host type. 
- token 
 Type: Microsoft.TeamFoundation.Framework.Server.OAuthToken- Token to look up. 
Return Value
Type: Microsoft.VisualStudio.Services.Identity.Identity
The Identity associated with the supplied token.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.