UserIdentity class
Contains the ID, tickets, and other information associated with a user.
Syntax
var userIdentity = getResults();
Attributes
- MarshalingBehaviorAttribute(Agile)
- VersionAttribute(NTDDI_WIN8)
Members
The UserIdentity class has these types of members:
Methods
The UserIdentity class inherits methods from the Object class (C#/VB/C++).
Properties
The UserIdentity class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | Contains the first name of the user. This value is available only to Microsoft application partners. | |
| Read-only | Contains a pair-wise user ID (PUID) to identify the user. | |
| Read-only | Indicates if the user is part of a beta program. This value is available only to Microsoft application partners. | |
| Read-only | Indicates if the user is on a PC that they have confirmed as their PC. This value is available only to Microsoft application partners. | |
| Read-only | Contains the user's last name. This value is available only to Microsoft application partners. | |
| Read-only | Returns the user's safe customer id. This value is available only to Microsoft application partners. | |
| Read-only | The sign in name of the user. This value is available only to Microsoft application partners. | |
| Read-only | Contains an array of tickets that identify the user |
Examples
List<OnlineIdServiceTicketRequest> targetArray = new List<OnlineIdServiceTicketRequest>(); targetArray.Add(new OnlineIdServiceTicketRequest("wl.basic wl.contacts_photos wl.calendars", "DELEGATION")); DebugPrint("Signing in ..."); Windows.Security.Authentication.OnlineId.UserIdentity result = await _authenticator.AuthenticateUserAsync(targetArray, CredentialPromptType.PromptIfNeeded); if (result.Tickets[0].Value != string.Empty) { DebugPrint("Signed in."); IsNotSignedIn = false; } else { // Handle errors like bad parameter, misconfigured target, and so on. DebugPrint("Unable to get the ticket. Error: " + result.Tickets[0].ErrorCode.ToString()); IsNotSignedIn = true; }
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps only] |
|
Minimum supported phone | Windows Phone 8 |
|
Namespace |
|
|
Metadata |
|
Build date: 3/14/2013
